-
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
Redefining variables from 'meta' (different behavior in 1.9, 2.0-rc and 2.0.0.2) #14411
Comments
Closing This TicketHi! We believe the above commit should resolve this problem for you. This will also be included in the next release. If you continue seeing any problems related to this issue, or 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. Thank you! |
In VariableManager, we fetch the params specifically in the next step, so including them in the prior step is unnecessary and could lead to things being overridden in an improper order. In Block, we should not be getting the params for the role as they are included earlier via the VariableManager. Fixes #14411
In VariableManager, we fetch the params specifically in the next step, so including them in the prior step is unnecessary and could lead to things being overridden in an improper order. In Block, we should not be getting the params for the role as they are included earlier via the VariableManager. Fixes ansible#14411
Hello,
I've got a bunch of playbooks written initially for ansible 1.9 by my precedessor. Recently I tried to adapt it to ansible 2.0 and discovered the difference in variable hadling when you override defaults in 'meta/main.yml'. I'd like know whether it's a bug or feature :)
I've tried 3 versions of Ansible:
ansible 1.9.4
ansible 2.0.0 (detached HEAD cc98528) last updated 2015/12/19 18:44:56 (GMT +300)
lib/ansible/modules/core: (detached HEAD fcb3397) last updated 2015/12/19 18:44:51 (GMT +300)
lib/ansible/modules/extras: (detached HEAD c682975) last updated 2015/12/19 18:44:56 (GMT +300)
ansible 2.0.0.2 (detached HEAD 7de237c) last updated 2016/01/21 23:40:54 (GMT +300)
lib/ansible/modules/core: (detached HEAD 09e2457) last updated 2016/01/21 23:40:48 (GMT +300)
lib/ansible/modules/extras: (detached HEAD e8427cb) last updated 2016/01/21 23:40:54 (GMT +300)
First, I going to show a test code (also here: https://github.com/serge-name/test-override-var):
playbook.yml:
test-override-var1/meta/main.yml:
test-override-var1/tasks/main.yml:
test-override-var1/meta/main.yml:
test-override-var3/defaults/main.yml:
test-override-var3/tasks/main.yml:
On ansible-1.9 I get the following sequence (the desired behavior):
On ansible-2.0-rc I get the following (and it gives me problems):
On ansible-2.0.0.2 I get the following (problems again):
The text was updated successfully, but these errors were encountered: