8000 Don't respect ANSIBLE_ROLES_PATH · Issue #4555 · ansible/ansible-lint · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Don't respect ANSIBLE_ROLES_PATH #4555

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
pulsar895 opened this issue Mar 18, 2025 · 2 comments
Open

Don't respect ANSIBLE_ROLES_PATH #4555

pulsar895 opened this issue Mar 18, 2025 · 2 comments < 8000 span data-issue-and-pr-hovercards-enabled>
Labels

Comments

@pulsar895
Copy link
pulsar895 commented Mar 18, 2025
Summary

The ansible-lint command adds ANSIBLE_ROLES_PATH to a path that is not defined anywhere.

Issue Type
  • Bug Report
OS / ENVIRONMENT
$ ansible-lint --version
ansible-lint 25.1.3 using ansible-core:2.18.1 ansible-compat:25.1.4 ruamel-yaml:0.18.10 ruamel-yaml-clib:None
  • ansible installation method: pipx
  • ansible-lint installation method: pipx
STEPS TO REPRODUCE

The ansible-lint command systematically creates an .ansible folder in my projects. This breaks the operation of my CIs and I don't want this folder to exist in my projects (even ignoring it is a problem). I thought I had misconfigured ansible-lint, but it seems to add the contents of ANSIBLE_ROLES_PATH to something hard-coded somewhere.

$ ANSIBLE_ROLES_PATH=/tmp/toto ansible-lint -v
INFO     Identified /home/pulsar/git/ops/ansible_roles/my_role as project root due .git directory.
INFO     Collection paths was patched to include extra directories /home/pulsar/.ansible/collections,/usr/share/ansible/collections,/home/pulsar/.local/share/pipx/venvs/molecule/lib/python3.13/site-packages,/home/pulsar/.local/share/pipx/venvs/molecule/lib64/python3.13/site-packages
INFO     Set ANSIBLE_LIBRARY=/home/pulsar/git/ops/ansible_roles/my_role/.ansible/modules:/home/pulsar/.ansible/plugins/modules:/usr/share/ansible/plugins/modules
INFO     Set ANSIBLE_COLLECTIONS_PATH=/home/pulsar/git/ops/ansible_roles/my_role/.ansible/collections:/home/pulsar/.ansible/collections:/usr/share/ansible/collections:/home/pulsar/.local/share/pipx/venvs/molecule/lib/python3.13/site-packages:/home/pulsar/.local/share/pipx/venvs/molecule/lib64/python3.13/site-packages
INFO     Set ANSIBLE_ROLES_PATH=/home/pulsar/git/ops/ansible_roles/my_role/.ansible/roles:/tmp/toto
INFO     Using /home/pulsar/git/ops/ansible_roles/my_role/.ansible/roles/acme.my_role symlink to current repository in order to enable Ansible to find the role using its expected full name.
INFO     Loading ignores from .gitignore
INFO     Executing syntax check on playbook molecule/default/prepare.yml (0.25s)
INFO     Executing syntax check on playbook molecule/default/converge.yml (0.26s)

Passed: 0 failure(s), 0 warning(s) on 42 files. Last profile that met the validation criteria was 'production'.

Problem: ANSIBLE_ROLES_PATH=/home/pulsar/git/ops/ansible_roles/my_role/.ansible/roles:/tmp/toto

@pulsar895 pulsar895 added bug new Triage required labels Mar 18, 2025
@audgirka audgirka removed the new Triage required label Apr 9, 2025
@audgirka
Copy link
Contributor
audgirka commented Apr 9, 2025

@pulsar895 can you confirm if this happens with the latest version of ansible-lint

@sibebleuze
Copy link

Could this be related to #4533?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

3 participants
0