Replies: 4 comments 9 replies
-
Please post a link to a repository where this misbehavior can be reproduced. By looking at it, it looks as a local configuration issue. I know for sure that the linter is not supposed to look outside the current project. |
Beta Was this translation helpful? Give feedback.
-
This seems to fix that issue...
Without setting that variable at runtime, I get:
When I do set it at runtime, I get:
I am guessing the same would need to be done for |
Beta Was this translation helpful? Give feedback.
-
I'm experiencing the same issue. For now, I'm going to create an |
Beta Was this translation helpful? Give feedback.
-
It still does with 6.8.0a0. Reproducible in a container where the ansible requirements are already installed in the default path ( Dockerfile
Reproducer
This is a sample case with a single role. My team uses a lot more third-party roles and collections where we cannot force maintainers to comply with ansible-lint rules. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Ansible-lint reports on roles and collections installed with ansible galaxy outside of current directory (at
~/.ansible/
)Issue Type
Ansible and Ansible Lint details
OS / ENVIRONMENT
Fedora 35 Workstation x64
python 3.10.3 with venv
STEPS TO REPRODUCE
From the project root activate venv, install dependencies and run ansible-lint:
Full directory structure (click to expand)
Desired Behavior
Ansible-lint might scan outside of project directory for its own use but it should not produce linting errors for files outside of it.
Actual Behavior
A lot of linting issues are reported way outside of project directory. Looks like it follows configured collection/role paths?
Might have been exposed by #2016 since reported paths are
~/.ansible
used by ansible-galaxy cli?Output of `ansible-lint -vvv --offline` (click to expand)
Beta Was this translation helpful? Give feedback.
All reactions