Hi,
I used to have this:
with_items: groups['masters']
I have now changed the group name to reflect the project name, which is
entered into the "project_name" variable when the playbook is run.
e.g. if the project is "test", the group will be "test-masters"
In the "with_items:" statement, I would like to be able to replace
"masters" with something like {{ project_name }}-masters.
The latest attempt is:
with_items: groups['"ansible_" + project_name + "-masters"']
I have been trawling this group and have tried various incantations, all to
no avail so far.
For bonus points, I also have this in a jinja2 template:
{% for host in groups['masters'] %}
- which will need the same treatment...
Any help appreciated!
Best regards,
David
--
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/04ebdda6-8878-4b3c-940a-e6230f591ec6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.