I have a similar issue and solved it by this PR
https://github.com/ansible/ansible/pull/51466 . if you want to use it, just
grab the source code and add it to your local library directory until it's
merged. Also see this thread
https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/ansible-project/Ssnk6exNjNs/sCKlrOp_FQAJ
With the approach above, the code would merge together all lists that match a
pattern, this way you can defined as many "users" variables as you want as long
as they are unique and start with say "users_"
If you don't want to copy the library or wait for the PR, then you could also
just merge a set of predefined lists.
ie..
with_items: "{{ users_host|default([]) + users_group_l1|default([]) +
users_group_l2|default([[) }}"
--
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/a46f8eae-d2db-4251-96fd-f4f180d2b23b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.