-
Notifications
You must be signed in to change notification settings - Fork 664
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
Ansible-lint reports error from foreign roles #1463
Comments
This is not a bug IMHO. It's linting playbook and this role should be linted as it's part of this playbook, of course you can exclude it if you don't want linting it:
|
@aminvakil I thought about this for some time, but I came to the conclusion that the default behavior of My proposition is to add a parameter to ansible-lint (e.g. |
This also seems to have broken a lot of my own role testing, to the point I'm considering removing Before 5.0, I was able to lint all my roles without having to also lint all the dependencies and other bits that a test playbook would use. Now, It's driving me mad, and I don't know if there's anything I can do short of dropping it from my workflow (at least for roles) at this time. I'm not sure what's going to happen on Galaxy when later versions of |
To avoid false-positive results from users did not add .cache folder to their .gitignore file, include it in the implicit exclude_paths. Fixes: #1463
I added a patch that should include Regarding the no-deep proposal is not really needed, we already have the If it would have being only about the linter itself, it could have being possible to include errors coming from the "inclusion" points, but that happens to also be done within ansible own code, and we cannot control these. |
To avoid false-positive results from users did not add .cache folder to their .gitignore file, include it in the implicit exclude_paths. Fixes: #1463
It happened :( |
@idolux - For now it's out, but I think I may be able to incorporate it again without too much pain... the annoyance is there are now five or six little 'meta setup' steps I have to take for each role whereas in the past it was usually just "add |
Summary
ansible-lint
install requirements into the.cache
dir of the currently tested role/playbook. If one of the roles in.cache/roles
contains an error, the linting fails for the local role/playbook.Issue Type
Ansible and Ansible Lint details
OS / ENVIRONMENT
CentOS8
STEPS TO REPRODUCE
requirements.yml
fileansible-lint
and pass the playbook as parameterDesired Behaviour
Ansible-lint exits successfully because the tested playbook contains no errors.
Actual Behaviour
Ansible-lint exits with an error because the included role contains a linting error.
The text was updated successfully, but these errors were encountered: