Hi,
something broke for ansible-lint in master:
pep8: 53158 W commands[5]> ansible-lint -v [tox/tox_env/api.py:428]
WARNING Ignore loading rule from /home/zuul/src/opendev.org/openstack/tripleo-heat-templates/.tox/pep8/lib/python3.10/site-packages/ansiblelint/rules/galaxy.py due to No module named 'pytest'
INFO Set ANSIBLE_LIBRARY=/home/zuul/.cache/ansible-compat/a4a0a3/modules:/home/zuul/.ansible/plugins/modules:/usr/share/ansible/plugins/modules
INFO Set ANSIBLE_COLLECTIONS_PATH=/home/zuul/.cache/ansible-compat/a4a0a3/collections:/home/zuul/.ansible/collections:/usr/share/ansible/collections
INFO Set ANSIBLE_ROLES_PATH=/home/zuul/.cache/ansible-compat/a4a0a3/roles:roles:/home/zuul/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
INFO Discovered files to lint using: git -c safe.directory=/home/zuul/src/opendev.org/openstack/tripleo-heat-templates ls-files --cached --others --exclude-standard -z
INFO Excluded removed files using: git -c safe.directory=/home/zuul/src/opendev.org/openstack/tripleo-heat-templates ls-files --deleted -z
Traceback (most recent call last):
File "/home/zuul/src/opendev.org/openstack/tripleo-heat-templates/.tox/pep8/bin/ansible-lint", line 8, in <module>
sys.exit(_run_cli_entrypoint())
File "/home/zuul/src/opendev.org/openstack/tripleo-heat-templates/.tox/pep8/lib/python3.10/site-packages/ansiblelint/__main__.py", line 349, in _run_cli_entrypoint
sys.exit(main(sys.argv))
File "/home/zuul/src/opendev.org/openstack/tripleo-heat-templates/.tox/pep8/lib/python3.10/site-packages/ansiblelint/__main__.py", line 244, in main
result = _get_matches(rules, options)
File "/home/zuul/src/opendev.org/openstack/tripleo-heat-templates/.tox/pep8/lib/python3.10/site-packages/ansiblelint/runner.py", line 220, in _get_matches
lintables = ansiblelint.utils.get_lintables(opts=options, args=options.lintables)
File "/home/zuul/src/opendev.org/openstack/tripleo-heat-templates/.tox/pep8/lib/python3.10/site-packages/ansiblelint/utils.py", line 870, in get_lintables
lintables.append(Lintable(path))
File "/home/zuul/src/opendev.org/openstack/tripleo-heat-templates/.tox/pep8/lib/python3.10/site-packages/ansiblelint/file_utils.py", line 245, in __init__
self._guess_kind()
File "/home/zuul/src/opendev.org/openstack/tripleo-heat-templates/.tox/pep8/lib/python3.10/site-packages/ansiblelint/file_utils.py", line 249, in _guess_kind
if isinstance(self.data, list) and "hosts" in self.data[0]:
IndexError: list index out of range
pep8: 101338 C exit 1 (48.18 seconds) /home/zuul/src/opendev.org/openstack/tripleo-heat-templates> ansible-lint -v pid=2539 [tox/execute/api.py:275]
.pkg: 101339 W _exit> python /home/zuul/.local/tox/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ [tox/tox_env/api.py:428]
From the last succesful check build[1] the difference seems to be the new line:
WARNING Ignore loading rule from /home/zuul/src/opendev.org/openstack/tripleo-heat-templates/.tox/pep8/lib/python3.10/site-packages/ansiblelint/rules/galaxy.py due to No module named 'pytest'
[1] https://zuul.opendev.org//t/openstack/builds?job_name=openstack-tox-pep8&project=openstack/tripleo-heat-templates&branch=master
The error can be found in that build [1] for instance, from that review[2]
[1] https:/ /zuul.opendev. org/t/openstack /build/ 6858bb70fb94410 1a48fc9de3b393c 2b/log/ job-output. txt#2739 /review. opendev. org/c/openstack /tripleo- heat-templates/ +/872568/
[2] https:/