Hi everyone, so happy to be here, this is my first post.
Here's what i need.
I have two groups:
[group_master]
host1
host2
host3
[group_slaves]
host4
host5
host6
i need to create a template that reflect a pair of "couples" like
host1 and host4
host2 and host4
host3 and host6
for that i thought going through the *group_master* and then do something
like this on the template.
possition_in_the_group = ANSIBLE_VARIABLE_THAT_DONT_KNOW_IF_EXISTS
master = {{ ansible_hostname }}
slave = {{ groups['group_slaves'][possition_in_the_group] }}
so, can i know through a simple variable and not having to jinja "script"
to know it, the position of the host im running the task on, has in the
group it belongs ?
thanks so much !
--
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/cccab836-89c4-4ad7-a514-5d422d31686a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.