Hi,
is it possible to expand a list variable within the inventory? E.g. I
have a list of users which should be allowed on all hosts but on /some/
hosts, additional users should be allowed. I want to define this in the
inventory:
So far I so:
----
[all]
users=['user1', 'user2']
[servers]
host1
host2 users=['user1', 'user2', 'user3']
host3
---
But this is redundant and inflexible. I'd prefer something like
----
[all]
users=['user1', 'user2']
host1
host2 users=users + ['user3']
host3
---
I've tried several variants to no avail.
users = users + ['user3']
users = [users, 'user3']
users = [{{users}}, 'user3']
Is such a lsit expansion possible?
Cheers
frank
--
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/94cdbc5d-8f76-36d8-ba9a-3271b1d9ad7b%40drosera.ch.
For more options, visit https://groups.google.com/d/optout.