My molecule invocation looks like this:
molecule test -s default 2>&1 test.log
Unfortunately, the command doesn't test the scenario:
INFO default scenario test matrix: dependency, lint, cleanup, destroy, syntax, create, prepare, converge, idempotence, side_effect, verify, cleanup, destroy
INFO Performing prerun...
INFO Added ANSIBLE_LIBRARY=/Users/oschlueter/.cache/ansible-compat/e0666c/modules:/Users/oschlueter/.ansible/plugins/modules:/usr/share/ansible/plugins/modules
INFO Added ANSIBLE_COLLECTIONS_PATH=/Users/oschlueter/.cache/ansible-compat/e0666c/collections:/Users/oschlueter/.ansible/collections:/usr/share/ansible/collections
INFO Added ANSIBLE_ROLES_PATH=/Users/oschlueter/.cache/ansible-compat/e0666c/roles:/Users/oschlueter/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
INFO Using /Users/oschlueter/.ansible/roles/company.python symlink to current repository in order to enable Ansible to find the role using its expected full name.
INFO Running default > dependency
WARNING Skipping, missing the requirements file.
WARNING Skipping, missing the requirements file.
INFO Running default > lint
COMMAND: set -e
yamllint .
ansible-lint
Loading custom .yamllint config file, this extends our internal yamllint config.
INFO Running default > cleanup
WARNING Skipping, cleanup playbook not configured.
INFO Running default > destroy
INFO Sanity checks: 'docker'
PLAY [Destroy] *****************************************************************
TASK [Destroy molecule instance(s)] ********************************************
changed: [localhost] => (item=instance)
TASK [Wait for instance(s) deletion to complete] *******************************
FAILED - RETRYING: Wait for instance(s) deletion to complete (300 retries left).
ok: [localhost] => (item=instance)
TASK [Delete docker networks(s)] ***********************************************
PLAY RECAP *********************************************************************
localhost : ok=2 changed=1 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0
INFO Running default > syntax
ERROR! the playbook: test.log could not be found
CRITICAL Ansible return code was 1, command was: ['ansible-playbook', '--inventory', '/Users/oschlueter/.cache/molecule/python-venv/default/inventory', '--skip-tags', 'molecule-notest,notest', '--syntax-check', 'test.log', '/Users/oschlueter/git/ansible/roles/python-venv/molecule/default/converge.yml']
WARNING An error occurred during the test sequence action: 'syntax'. Cleaning up.
INFO Running default > cleanup
WARNING Skipping, cleanup playbook not configured.
INFO Running default > destroy
PLAY [Destroy] *****************************************************************
TASK [Destroy molecule instance(s)] ********************************************
changed: [localhost] => (item=instance)
TASK [Wait for instance(s) deletion to complete] *******************************
FAILED - RETRYING: Wait for instance(s) deletion to complete (300 retries left).
ok: [localhost] => (item=instance)
TASK [Delete docker networks(s)] ***********************************************
PLAY RECAP *********************************************************************
localhost : ok=2 changed=1 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0
It seems that molecule includes the target of my redirect into its ansible invocation for some reason.