-
Notifications
You must be signed in to change notification settings - Fork 709
Closed as not planned
Description
Summary
I have the following PPA "https://ppa.launchpadcontent.net/ansible/ansible/ubuntu noble main" configured on an Ubuntu 24.04.3 LTS system, and both ansible and ansible-lint are installed from this PPA.
After a recent "apt upgrade", when I try running ansible-lint, I get the following traceback:
$ ansible-lint
Traceback (most recent call last):
File "/usr/bin/ansible-lint", line 5, in <module>
from ansiblelint.__main__ import _run_cli_entrypoint
File "/usr/lib/python3/dist-packages/ansiblelint/__main__.py", line 39, in <module>
from ansiblelint import cli
File "/usr/lib/python3/dist-packages/ansiblelint/cli.py", line 29, in <module>
from ansiblelint.yaml_utils import clean_json
File "/usr/lib/python3/dist-packages/ansiblelint/yaml_utils.py", line 31, in <module>
from ansiblelint.utils import Task
File "/usr/lib/python3/dist-packages/ansiblelint/utils.py", line 41, in <module>
from ansible.parsing.yaml.constructor import AnsibleConstructor, AnsibleMapping
ModuleNotFoundError: No module named 'ansible.parsing.yaml.constructor'
Issue Type
- Bug Report
OS / ENVIRONMENT
$ ansible-lint --version
Traceback (most recent call last):
File "/usr/bin/ansible-lint", line 5, in <module>
from ansiblelint.__main__ import _run_cli_entrypoint
File "/usr/lib/python3/dist-packages/ansiblelint/__main__.py", line 39, in <module>
from ansiblelint import cli
File "/usr/lib/python3/dist-packages/ansiblelint/cli.py", line 29, in <module>
from ansiblelint.yaml_utils import clean_json
File "/usr/lib/python3/dist-packages/ansiblelint/yaml_utils.py", line 31, in <module>
from ansiblelint.utils import Task
File "/usr/lib/python3/dist-packages/ansiblelint/utils.py", line 41, in <module>
from ansible.parsing.yaml.constructor import AnsibleConstructor, AnsibleMapping
ModuleNotFoundError: No module named 'ansible.parsing.yaml.constructor'
But
$ apt list --installed | grep ansible-lint
ansible-lint/noble,now 6.17.2-1 all [installed]- ansible installation method: OS package from PPA
- ansible-lint installation method: OS package from PPA
- OS: Ubuntu 24.04.3 LTS
STEPS TO REPRODUCE
- Install ansible and ansible-lint from the PPA
- Run ansible-lint with any parameter, the traceback will be the same as above.
Desired Behavior
Should kinda work.
I don't really want to switch to the pip/pipx installation of ansible-lint because in this case it does not see the ansible collections installed by ansible, so by working around one problem, I get another.
If you do not maintain the PPA, please kindly redirect me to the official PPA or to the above PPA maintainers.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done