well, in that case I will have to stay vigilant :( Thank you. 2015年10月4日日曜日 3時03分35秒 UTC+9 Dan Stillman: > > On 10/3/15 10:49 AM, t goto wrote: > > Thanks for info, Dan. > Glad to see that at least someone is already working on it :), and it > probably will be fixed in ver2. > > > Well, unfortunately that's not the case — my point was that, even though > this was acknowledged as a bug in 1.9 that had been fixed in 2.0, the > GitHub issue was left closed after I reported that it had regressed again > in 2.0. And given that none of the simple test cases I've provided for this > and other variable precedence bugs have been incorporated into the test > suite, there's no reason to think that, even if it is fixed, it will stay > that way. > > > > I'm going to remove the "include_vars" from playbook until Ansible 2.0 > arrives! > > Thank you! > > > > 2015年10月3日土曜日 4時08分08秒 UTC+9 Dan Stillman: >> >> I think that's the issue I reported here: >> >> https://github.com/ansible/ansible/issues/11996 >> >> Initially closed as a "possible misunderstanding", then acknowledged as >> broken on 1.9 and fixed on 2.0, then broken again on 2.0, and the issue was >> left closed. Seems pretty clear to me that it's not the wanted behavior. >> >> See also: >> >> https://groups.google.com/d/msg/ansible-project/4OIuDxRSv0M/RgW8HkuIKQAJ >> >> On 10/2/15 6:06 AM, t goto wrote: >> >> Hello, experts. >> Let me ask you about weird behavior between include_vars and role >> variable. >> >> I have a couple of roles, "test_before" and "test_after" >> . >> `-- test_before >> |-- tasks >> | `-- main.yml >> `-- vars >> `-- RedHat.yml >> |-- test_after >> | |-- tasks >> | | `-- main.yml >> | `-- vars >> | `-- main.yml >> >> >> >> First role reads OS specific variables. >> Main task file and OS specific variable file follow. >> >> test_before/tasks/main.yml >> --- >> - name: Add the OS specific variables >> include_vars: "{{ ansible_os_family }}.yml" >> >> >> - debug: message="{{item}}" >> with_items: packages >> >> >> test_before/vars/RedHat.yml >> --- >> packages: >> - alpha >> - bravo >> >> >> >> On the otherhand, second role reads role's main.yml like following. >> >> test_after/tasks/main.yml >> --- >> - debug: message="{{item}}" >> with_items: packages >> >> >> test_after/vars/main.yml >> --- >> packages: >> - yankee >> - zulu >> >> >> >> I intended running those roles displays "alpha, bravo" from first role, >> then "yankee, zulu" from second role, but both role display "alpha, bravo", >> just like second role didn't read vars/main.yml. >> >> PLAY [override test] >> ********************************************************** >> >> >> TASK: [test_before | Add the OS specific variables] >> ********************************** >> ok: [10.10.14.3] >> >> >> TASK: [test_before | debug message="{{item}}"] >> *************************************** >> ok: [10.10.14.3] => (item=alpha) => { >> "item": "alpha", >> "msg": "Hello world!" >> } >> ok: [10.10.14.3] => (item=bravo) => { >> "item": "bravo", >> "msg": "Hello world!" >> } >> >> >> TASK: [test_after | debug message="{{item}}"] >> ********************************* >> ok: [10.10.14.3] => (item=alpha) => { >> "item": "alpha", >> "msg": "Hello world!" >> } >> ok: [10.10.14.3] => (item=bravo) => { >> "item": "bravo", >> "msg": "Hello world!" >> >> >> Is my intention wrong or there's something else I should've look after? >> Thank you. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ansible Project" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> To view this discussion on the web visit >> <https://groups.google.com/d/msgid/ansible-project/d02cdddc-222f-4d71-9a0c-ab6baf7750c0%40googlegroups.com> >> https://groups.google.com/d/ >> msgid/ansible-project/d02cdddc-222f-4d71-9a0c-ab6baf7750c0%40googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> >> >> -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] <javascript:>. > To post to this group, send email to [email protected] > <javascript:>. > To view this discussion on the web visit > <https://groups.google.com/d/msgid/ansible-project/0d949cba-c6f4-47c7-b17f-8e797332b7ef%40googlegroups.com?utm_medium=email&utm_source=footer> > https://groups.google.com/d/msgid/ansible-project/0d949cba-c6f4-47c7-b17f-8e797332b7ef%40googlegroups.com > . > For more options, visit https://groups.google.com/d/optout. > > >
-- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/b0b32b65-8c81-4bc1-8bd8-475d17ee02be%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
