Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Add warning when later roles are overridden #48587
You currently don't get any sort of help diagnosing a situation where
This continues the path walk when importing the roles, and warns if
The documentation is enhanced to discuss the role import precedence.
An integration test is added to match the new behaviour.
This situation arose because we moved a role in our git tree. This particular role had a
Of course, when it is explained, it all becomes rather obvious. However, I feel a warning like this would have made it much clearer much sooner. I think a warning is justified as it is best practice to avoid pointing guns at your foot by giving roles the same name.
You currently don't get any sort of help diagnosing a situation where a role in a later entry of ANSIBLE_ROLES_PATH is overriden by a role with the same name earlier in the path. Although you can pick things out of the task paths from when it's running, since the names are the same (kind of the point :) it can be very confusing as to what's happening. This continues the path walk when importing the roles, and warns if you have later roles that are being ignored due to earlier matches. The documentation is enhanced to discuss the role import precedence. An integration test is added to match the new behaviour.
Hi @ianw, sorry for taking so long to get back to this. Unfortunately I think we're going to pass on merging this for now for the following reasons:
If you have any further questions, please let us know by stopping by one of the two mailing lists, as appropriate:
Because this project is very active, we're unlikely to see comments made on closed tickets, but the mailing list is a great way to ask questions, or post if you don't think this particular issue is resolved.