I don't know whether this works in your case, but we worked around, by
creating different lists and manually merging them together:
type_policy1:
- whatever
- your
- policy
type_policy2:
- list
- looks
- like
host_policy: '{{ policies1 + policies2 }}'
Am Samstag, 9. Januar 2016 02:12:14 UTC+1 schrieb Guy Knights:
>
> Is there any way to merge lists from group_vars, much like hash_behaviour
> = merge, but for lists? From what I can tell, there is no explicit
> list_behaviour option I can set, but is there perhaps a manual way I can do
> this? I have a firewall configuration that uses group_vars to define the
> rules that are applied to each type of server, but now I'm trying to
> provision a server that is a member of multiple groups and it's only
> applying the rules from the last group that it belongs to. One way around
> my issue is to explicitly specify the rules in a host_vars file for this
> server only, but it feels a bit redundant; I'd really prefer if the rule
> lists could be combined from all groups this server belongs to as then I
> wouldn't have to go through each group and manually combine the lists in
> the host_vars file.
>
> Thanks,
> Guy
>
--
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/caf080f9-18f0-4980-8dc1-1a425fd6bf4c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.