-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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 2.2 inconsistent include_vars behaviour (with/without register) #21088
Comments
Similar issue for ansible 2.1.1.0. With 2.1 I can't fallback on include_vars "name" option either. I've been wrestling with this for awhile so I'm glad I found this open issue. Has a fix or workaround been identified? Thank you. |
This is still happening with 2.3. I was fighting this all afternoon until I realized it was a bug. The name property of include_vars works fine for me with 2.3 |
This seems to be happening because of where the variable is marked as 'unsafe' and hence not templated by the Templar: https://github.com/ansible/ansible/blob/devel/lib/ansible/template/__init__.py#L401 i am not sure what would be the best way to fix this since i am not sure of the security implications so i defer it to the experts :) |
This is likely also fixed by this PR, as is 36024 (see above), a related and replicated bug that was closed for some reason :( If I can get some confirmation that it will be merged, I'm happy to get it up-to-date (again sigh) Is anyone here willing to write some tests or give me some pointers on what tests are needed for core functionality like this and where they should live? That's the only piece I'm missing. |
the same for 2.9.6 :( |
Over 2 years now that PR has been languishing. It's such a huge improvement to ansible core :( |
But I just can't put the time into keeping it constantly up to date with no expressed interest in reviewing or merging it. Happy to do so if you can get some ansible dev attention :) |
I just stumbled across this issue - still happening with Ansible 2.10.5 :( |
ISSUE TYPE
COMPONENT NAME
include_var
(may be some other facts-generating modules/plugins)ANSIBLE VERSION
CONFIGURATION
Default
OS / ENVIRONMENT
N/A
SUMMARY
In the following vars file
my_list
andmy_list2
dict keys gives different results depending on whether weregister
results or not.STEPS TO REPRODUCE
Vars file
w61_vars.yml
:Playbook file
w61.yml
:EXPECTED RESULTS
Debug module should produce equal result in each case.
ACTUAL RESULTS
my_list
is templated withoutregister
and is not templated withregister
keyword.In
Ansible 2.2.0
result withregister
is even weirder:The text was updated successfully, but these errors were encountered: