ansible/molecule

`molecule list` finds scenarios in virtual envrionments

cidrblock opened this issue · 0 comments

for c in glob.glob(

We may want to comapre the glob result to the gitignore file.

Something like this may work:

https://github.com/ansible-community/pytest-ansible/pull/147/files#diff-02f455c445e2548f737624f7f6f482b28f0bd5f705b60f9d0dc3040293c4d0acR283

example here:

(venv) nuc ➜  ansible.scm git:(molecule2) ✗ molecule list 
WARNING  The scenario config file ('/home/bthornto/github/ansible.scm/venv/lib/python3.11/site-packages/molecule/test/scenarios/cleanup/molecule/default/molecule.yml') has been modified since the scenario was created. If recent changes are important, reset the scenario with 'molecule destroy' to clean up created items or 'molecule reset' to clear current configuration.
WARNING  The scenario config file ('/home/bthornto/github/ansible.scm/venv/lib/python3.11/site-packages/molecule/test/scenarios/driver/delegated/molecule/default/molecule.yml') has been modified since the scenario was created. If recent changes are important, reset the scenario with 'molecule destroy' to clean up created items or 'molecule reset' to clear current configuration.
WARNING  The scenario config file ('/home/bthornto/github/ansible.scm/venv/lib/python3.11/site-packages/molecule/test/scenarios/driver/delegated_invalid_role_name_with_role_name_check_equals_to_1/molecule/default/molecule.yml') has been modified since the scenario was created. If recent changes are important, reset the scenario with 'molecule destroy' to clean up created items or 'molecule reset' to clear current configuration.
WARNING  The scenario config file ('/home/bthornto/github/ansible.scm/venv/lib/python3.11/site-packages/molecule/test/scenarios/host_group_vars/molecule/default/molecule.yml') has been modified since the scenario was created. If recent changes are important, reset the scenario with 'molecule destroy' to clean up created items or 'molecule reset' to clear current configuration.
WARNING  The scenario config file ('/home/bthornto/github/ansible.scm/venv/lib/python3.11/site-packages/molecule/test/scenarios/interpolation/molecule/default/molecule.yml') has been modified since the scenario was created. If recent changes are important, reset the scenario with 'molecule destroy' to clean up created items or 'molecule reset' to clear current configuration.
CRITICAL Failed to find driver None. Please ensure that the driver is correctly installed.

Note the warnings related to files found within a virtual environment which is ignored by git.