I have role, role-1, that I'm testing that is dependent on another role, role-2.
I clone the second role, role-2, into /tmp
during the prepare step, and it is imported later from /tmp
during the converge, however during the
INFO Running default > syntax
I get an error, that role-2 is not found, as this role is not yet cloned and does not exist on the system.
From the debug/verbose output it look like molecule test
result in the following command being run
COMMAND: ansible-playbook --diff --inventory /home/vagrant/.cache/molecule/role-1/default/inventory --skip-tags molecule-notest,notest --syntax-check /opt/role-1-role/ansible/roles/role-1/molecule/default/converge.yml
Is there a way to stop this command running the --syntax-check
, override the default command that molecule test
runs? Or the have the syntax-check skip certain tasks or files?
CodePudding user response:
Just found that you can add scenario
to the molecule.yml
file and overwrite/re-order the test sequence, so that solves the issue I was having, by reordering the sequence so that the syntax check happened after the prepare step.