When I run ansible-lint via Molecule in the molecule example in CI, it fails because Ansible is not installed. The latest versions of ansible-lint no longer strictly depend on Ansible, so it is not installed by default. Need to explicitly install it.
Molecule default > lint
COMMAND: set -e
yamllint .
ansible-lint
Unable to find a working copy of ansible executable. CompletedProcess(args=['ansible', '--version'], returncode=1, stdout='', stderr='Traceback (most recent call last):\n File "/usr/bin/ansible", line 34, in <module>\n from ansible import context\nModuleNotFoundError: No module named \'ansible\'\n')
CRITICAL Lint failed with error code 4
WARNING An error occurred during the test sequence action: 'lint'. Cleaning up.
When I run
ansible-lintvia Molecule in themoleculeexample in CI, it fails because Ansible is not installed. The latest versions of ansible-lint no longer strictly depend on Ansible, so it is not installed by default. Need to explicitly install it.