I’m looking for some guidance about variable resolution of passed in extra variables when used with include files.
I’ve brought up this issue before and made a fix but it has languished in the backlog. The code in the runner has changed considerably since the fix I made and I’d like to discuss what the expected behavior should be so I can update the PR.
Looking at the runner, the templates are resolved very early in the process, long before the precedence of each type of variable is calculated. For the most part this works ok, but it falls down when passing extra variables to include files as the templating is executed before the extras are resolved.
This gist shows the issue.
if the templating is left until the variable precedence has been calculated then the correct var gets used.
I use includes extensively to make playbooks reusable so this hurts me alot. I’ve been chasing it for the past 6 months, reworking the fix when the runner changes patching my ansible installs. Its a fairly isolated change and would be seriously helpful If I could get a fix in for this, I’ll gladly make whatever changes and tests are required for this to get resolved and integrated. Do you think this can happen?
As a wider point, there are a large number of pull requests that seem to never get resolved. I realize that you are all working flat out and there are only a finite number of hours in your days, but there is a huge community ready and willing to help, I know I am. What process could be put in place so that we the community can vet and triage bugs so that you (beleaguered and harried) project developers can make the best use of your time and focus on merging sound fixes. I’ve been using TestKitchen and Vagrant to develop my playbooks. I think that formalizing this or a more ansible/pythonic version of it into the PR process would help speed things up no end. I’d love to hear others thoughts on this as its a conversation well worth starting.
Thanks for a great product.
Regards,
Steve.