I am testing version compatibility with molecule and for the combination
python 3.8 x ansible latest x debian
molecule breaks in the instance creation step with
TASK [Wait for instance(s) creation to complete] *******************************
FAILED - RETRYING: Wait for instance(s) creation to complete (300 retries left).
failed: [localhost] (item=None) => {"attempts": 2, "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false}
fatal: [localhost]: FAILED! => {"censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false}
PLAY RECAP *********************************************************************
localhost : ok=6 changed=3 unreachable=0 failed=1 skipped=3 rescued=0 ignored=0
https://travis-ci.com/ckaserer/ansible-role-example/jobs/256557752
In order to debug further, I need to set the no_log: false
.
Any ideas on how to set no_log to true for molecule's own internal playbooks?
I tried with MOLECULE_DEBUG
, but that did not do the trick.
Searching molecule's doc did not give any results either.
running molecule with
molecule --debug test
also does not set the molecule playbook variable for no_log to false
You can set the environment variable
MOLECULE_NO_LOG="false"
and then run your normal molecule command .e.g.
molecule test
That wasn't easy to find, I had to take a look at the source code of molecule and found that
molecule/test/resources/playbooks/docker/create.yml
which is the playbook used to create docker images that are defined by Dockerfile.j2
uses the variable molecule_no_log
to set the no_log
value in the playbook.
Additionally, in
molecule/test/unit/provisioner/test_ansible.py
the variable molecule_no_log
is based on the environment variable MOLECULE_NO_LOG
So, in the end, I just needed to set the appropriate environment variable to false
.
Molecule source code
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With