Sebastian Gumprich <
zufal...@gmail.com> 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.