Serge, thanks for the fast clarification.

Am Freitag, 17. April 2015 17:43:00 UTC+2 schrieb Serge van Ginderachter:
>
>
> On 17 April 2015 at 17:31, Sandra Parsick <[email protected] 
> <javascript:>> wrote:
>
>> So my question, why my expectation is wrong?
>>
>
>
> ​yes, it's a feature, not a bug :)
> Io just answered the same question on 
> https://github.com/ansible/ansible/issues/10755, so copy pasting my 
> answer:
>
> This is a feature and not a bug, and has been asked several times yet here 
> and on the list. You are trying to use a way to define things that just 
> isn't the way ansible dpes things.
>
> Ansible only uses variables on the host level. The inventory only returns 
> variables after they are calculated/inherited down top that host level.
>
> When you target a play to a particular group, that gets calculated down to 
> a list of hosts. Whether you call groupA or groupB here, it results in the 
> same host. And that hosts only has one particular value for myvar, which 
> happens to be groupB because thats the last one bing parsed.
>
> To quote the docs: 
>
> Remember: Child groups override parent groups, and hosts always override 
> their groups.
>
> ​
>
>     Serge
>

-- 
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/74dc2279-47c5-4b6c-b0bd-cc633905fa2b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to