Skip to content
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

include_vars: foo.yml within a role no longer overrides roles/a/vars/main.yml #9498

Closed
dstillman opened this issue Nov 6, 2014 · 4 comments
Labels
bug This issue/PR relates to a bug. P1 Priority 1 - Immediate Attention Required; Release Immediately After Fixed
Milestone

Comments

@dstillman
Copy link

Issue Type:

Bug Report

Ansible Version:

8a1fbed and later

Environment:

Amazon Linux AMI release 2014.09

Summary:

include_vars: foo.yml within a role no longer overrides variables set in roles/a/vars/main.yml

Steps To Reproduce:

main.yml:

- hosts: 127.0.0.1
  roles:
    - role: a

roles/a/vars/main.yml:

foo: BAD

roles/a/vars/foo.yml:

foo: GOOD

roles/a/tasks/main.yml:

- include_vars: foo.yml

- debug: var=foo

- assert: { that: "foo == 'GOOD'" }
Expected Results:

foo should be set to 'GOOD' because of the foo.yml include. This is the case in both 1.5.0 and 1.7.2.

Actual Results:

foo is set to 'BAD' in 8a1fbed and up.

@bcoca bcoca added P1 Priority 1 - Immediate Attention Required; Release Immediately After Fixed bug_report labels Nov 12, 2014
@jimi-c jimi-c closed this as completed in 9a0f8f0 Nov 17, 2014
@jimi-c
Copy link
Member

jimi-c commented Nov 17, 2014

Closing This Ticket

Hi!

We believe the above commit should resolve this problem for you. This will also be included in the next major 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!

@dstillman
Copy link
Author

This appears to be broken again on devel:

ansible 2.0.0 (devel 5eeeb87d82) last updated 2015/08/18 13:13:57 (GMT -400)
  lib/ansible/modules/core: (detached HEAD dea5f5d15e) last updated 2015/08/18 15:45:23 (GMT -400)
  lib/ansible/modules/extras: (detached HEAD 210ee3febc) last updated 2015/08/18 15:45:23 (GMT -400)
  v1/ansible/modules/core: (detached HEAD f8d8af17cd) last updated 2015/08/18 14:59:01 (GMT -400)
  v1/ansible/modules/extras: (detached HEAD 495ad450e5) last updated 2015/08/18 14:59:03 (GMT -400)

@jimi-c
Copy link
Member

jimi-c commented Aug 21, 2015

@dstillman I see where the problem is, and will have a patch merged in shortly.

@jimi-c jimi-c closed this as completed in 635fa07 Aug 21, 2015
@jimi-c
Copy link
Member

jimi-c commented Aug 21, 2015

Fixed per the above commit.

@ansibot ansibot added bug This issue/PR relates to a bug. and removed bug_report labels Mar 6, 2018
@ansible ansible locked and limited conversation to collaborators Apr 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue/PR relates to a bug. P1 Priority 1 - Immediate Attention Required; Release Immediately After Fixed
Projects
None yet
Development

No branches or pull requests

4 participants