When comparing the source package from GitHub, it appears that a number of JSON and YAML files weren't copied into the installation directory. This is causing ansible-lint to fail. Traceback (most recent call last): File "/usr/lib/python-exec/python3.10/ansible-lint", line 5, in <module> from ansiblelint.__main__ import _run_cli_entrypoint File "/usr/lib/python3.10/site-packages/ansiblelint/__main__.py", line 40, in <module> from ansiblelint import cli File "/usr/lib/python3.10/site-packages/ansiblelint/cli.py", line 12, in <module> from ansiblelint.config import DEFAULT_KINDS, DEFAULT_WARN_LIST, PROFILES File "/usr/lib/python3.10/site-packages/ansiblelint/config.py", line 100, in <module> PROFILES = yaml_from_file(Path(__file__).parent / "data" / "profiles.yml") File "/usr/lib/python3.10/site-packages/ansiblelint/loaders.py", line 23, in yaml_from_file with open(str(filepath), encoding="utf-8") as content: FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/python3.10/site-packages/ansiblelint/data/profiles.yml' Adding data/profiles.yml just leads to another missing file: Traceback (most recent call last): File "/usr/lib/python-exec/python3.10/ansible-lint", line 5, in <module> from ansiblelint.__main__ import _run_cli_entrypoint File "/usr/lib/python3.10/site-packages/ansiblelint/__main__.py", line 40, in <module> from ansiblelint import cli File "/usr/lib/python3.10/site-packages/ansiblelint/cli.py", line 25, in <module> from ansiblelint.schemas.main import validate_file_schema File "/usr/lib/python3.10/site-packages/ansiblelint/schemas/__init__.py", line 2, in <module> from ansiblelint.schemas.main import JSON_SCHEMAS, refresh_schemas, validate_file_schema File "/usr/lib/python3.10/site-packages/ansiblelint/schemas/main.py", line 42, in <module> with open(store_file, encoding="utf-8") as json_file: FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/python3.10/site-packages/ansiblelint/schemas/__store__.json' Adding that file and the rest of the schemas/*.json files allows ansible-lint to run. There may be additional files missing, I have not investigated further.
How are you generating these tracebacks?
Those are dumped when running the command. I specifically ran it as follows: ansible-lint --offline --nocolor -f codeclimate "<file_path_here>"
I can't reproduce. In fact, I do have these those files installed by ansible-lint: $ qfile /usr/lib/python3.10/site-packages/ansiblelint/schemas/__store__.json /usr/lib/python3.10/site-packages/ansiblelint/data/profiles.yml app-admin/ansible-lint: /usr/lib/python3.10/site-packages/ansiblelint/schemas/__store__.json app-admin/ansible-lint: /usr/lib/python3.10/site-packages/ansiblelint/data/profiles.yml How did you install ansible-lint?
Sadly, something IS borked in the GitHub tarball of 6.11.0 - the relevant files are indeed not installed in spite of being present. Will just switch to the PyPI tarballs, now that upstream considers Internet access mandatory for running tests the original rational for using GitHub ones - that they contained additional files required by the test suite - no longer holds.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9cd82a8771e803de1b647399d8ea717c18d8da14 commit 9cd82a8771e803de1b647399d8ea717c18d8da14 Author: Marek Szuba <marecki@gentoo.org> AuthorDate: 2023-01-27 22:11:00 +0000 Commit: Marek Szuba <marecki@gentoo.org> CommitDate: 2023-01-27 22:13:58 +0000 app-admin/ansible-lint: switch back to PyPI tarballs GitHub ones no longer offer any advantages over PyPI ones now that upstream officially requires the test suite to have Internet access, and at least for 6.11.0 they do not even install correctly. Closes: https://bugs.gentoo.org/892093 Signed-off-by: Marek Szuba <marecki@gentoo.org> app-admin/ansible-lint/Manifest | 2 +- .../{ansible-lint-6.11.0.ebuild => ansible-lint-6.11.0-r1.ebuild} | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-)
Well, the files in question *are* indeed installed by 6.11.0, so I still have no idea what's causing the issue for the reporter. $ qfile -v /usr/lib/python3.10/site-packages/ansiblelint/schemas/__store__.json /usr/lib/python3.10/site-packages/ansiblelint/data/profiles.yml app-admin/ansible-lint-6.11.0: /usr/lib/python3.10/site-packages/ansiblelint/schemas/__store__.json app-admin/ansible-lint-6.11.0: /usr/lib/python3.10/site-packages/ansiblelint/data/profiles.yml
(In reply to John Helmert III from comment #6) > Well, the files in question *are* indeed installed by 6.11.0, so I still > have no idea what's causing the issue for the reporter. They weren't for me when I tried it today.