Molecule fails with "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result"

Viewed 7931

I am using Ansible with Molecule. I just ran into the situation that converging my role failed with:

fatal: [instance]: FAILED! => {"censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result"}

How to mitigate? Hold on a sec, I will answer ...

1 Answers

What worked for me is to set logging to "true" for molecule:

  1. Go to the "molecule.yml" file, this is where you do your configuration for molecule.
    You should find it in the molecule/default/ directory
  2. Look for the provisioner: section
  3. Add log: true to it.
  4. VoilĂ !

That's how it looks:

provisioner:
  name: ansible
  log: true

Note that there may by other settings in this very section for the provisioner.

Related