-
Notifications
You must be signed in to change notification settings - Fork 673
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
var-naming[no-role-prefix] triggering for vars when used with "include_role" in 6.16.1 #3465
Comments
I think that this is a valid false positive which can be handled using |
It is true that in this context, the prefix should be determined not by current role, but by included role, so that is a valid bug. |
Hi @ssbarnea I've tested with 6.16.2 but this error still seems present, can we re-open the issue please? Here's an example which raises this error:
The linter returns errors:
|
@Rylon the fix is not in a tagged release yet, currently just in the |
Summary
We have various roles that encapsulate shared functionality. We use
include_role
to include these shared roles in our main roles, and we pass along variables to the included role usingvars
, for example:In Ansible Lint 6.16.1 we're getting tons of errors for
var-naming[no-role-prefix]
I'm assuming because the prefixshared_role_
doesn't match the name of the role that is including the shared role or something?The issue is not present in 6.16.0.
Issue Type
OS / ENVIRONMENT
ansible-lint 6.16.0 using ansible 2.14.5
STEPS TO REPRODUCE
As described in the summary, try to include a second role from a first role, and pass role vars along.
Desired Behavior
There should be no failure detected in the linter.
Actual Behavior
The linter shows
var-naming[no-role-prefix]
errors for each occurrence.The text was updated successfully, but these errors were encountered: