Not used 1.7, only 1.9. And my experience is that only variables defined on
defaults/main.yml on dependant role can be overridden. I usually use
group_vars to override them, but in a few corner cases the only way I found
to achieve what you pretend to do is to override them at the playbook
level, and only when defined whithin the role definition (see below) and
not in the playbook vars block (my tree is far more complex that only
parent and children).
I did just consider it an annoyance, but as you state that it worked on 1.7
(and is what I expected at the beginning), it could be probably a bug.
- hosts: ...
roles:
- role:
var_foo: value
On Tue, Jan 26, 2016 at 12:06 PM, Hleb Valoshka <[email protected]> wrote:
> Hi all.
>
> I have role_a and role_b which depends on role_a.
>
> role_a defines variable var_foo (in vars/main.yml), role_b wants to
> redefine it (in its own vars/main.yml). With 1.7.2 this works, but with
> 1.9.[24] - not.
>
> I've tried to pass required variable through meta (- {role: role_a,
> var_foo: "{{ var_foo }}"}) but this doesn't work as well.
>
> So whether I'm doing it wrong or 1.9 is buggy?
>
>
>
--
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/CANsNpUQHc95J_cPg9QsYFWi5o1yKd3QvRPdMOYFyc8-6Z-NjCw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.