Sebastian Gumprich <[email protected]> napisał:
>Thanks for your input.
>I tried setting hash_behaviour to "merge" but this doesn't work.

hash_behaviour only affects dictionaries


> Even when 
>I put the two lists into one vars-file, only the last list will be
>used.

Repeated keys in a dictionary is implementation-defined in YAML, and PyYaml 
(the library Ansible uses) just ignores all but the last repeated key.


>But you mentioning naming the variable different gave me an idea. I'm
>using 
>different variables in group_vars and host_vars now and use multiple
>tasks 
>and templates.
>
>Thanks!
>
>
>Am Mittwoch, 7. Januar 2015 15:11:30 UTC+1 schrieb Brian Coca:
>>
>> ansible by default will override previous definitions with newer
>ones, 
>> in this case group 'all' gets loaded first and then overwritten by 
>> group1. 
>>
>> You can change this behavior globally using the hash_behaviour entry 
>> in ansible.cfg. 
>> Or you can name the variable differently and then use the |union 
>> filter in the task to aggregate them just for that task. 
>>
>>
>>
>> -- 
>> Brian Coca 
>>

-- 
Wysłane za pomocą K-9 Mail.

-- 
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/eeb7d139-d6db-44cb-96aa-278382f97eab%40email.android.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to