the groups variable is a dictionary with the groups in which the keys are the list of servers that are part of it, so for example groups['all'] has a list of all the servers, you just need groups[<my server group>]
On Tue, Apr 14, 2015 at 7:53 PM, ajres <[email protected]> wrote: > I have a playbook that configures multiple client machines. > > Each client needs to be configured with a unique server IP address from the > servers in a cluster. > > The mapping from client to server is one-to-one, all the hosts are running > in ec2, and the inventory is dynamic. > > Is there a way that I can get the list of servers from the inventory as a > list variable, and iterate over the the list as ansible configures each > client? > > -- > 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/fde868a8-ec24-44e8-9543-a1ceb58b9a26%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- Brian Coca -- 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/CAJ5XC8nYAeE_it6rKpq0Af65%3Dz0rEDUK8KFaRSx3TdSf7tssiQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
