Replied, didn't find the description very clear -- if you can update the formatting of this ticket to where the YAML is readable that would be helpful.
On Mon, May 5, 2014 at 9:28 AM, 'Petros Moisiadis' via Ansible Project < [email protected]> wrote: > On 05/01/14 17:24, Adam Morris wrote: > > Actually I think that he is trying to configure something for a group of > hosts rather than configure something on a group of hosts. For example > lets assume that you have a DHCP server and you want to configure static ip > addresses for each of your servers. You could run through each host > grabbing all of the MAC addresses and IP addresses from each server but you > would only be configuring them on one server. > > I am not saying that that is the case and I am curious as to what the case > is, but that is an example of what I think we are being asked for here. > On Apr 29, 2014 11:36 AM, "nZac" <[email protected]> wrote: > >> "I want is simply to have the task run for each item in "mylist" for >> each host in "somegroup"." >> >> Ansible loops through your groups and hosts and executes tasks against >> them. Therefore there is no need to manage an outer loop, Ansible does it >> for you and is central to how Ansible works. >> >> "Thus, have the task run for 5 times: for item1, item2, item3, item4 and >> item5." >> >> This inner loop is as simple as with_items as already suggested. >> >> Does that help or did I confuse you more? >> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "Ansible Project" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/ansible-project/RQYOP_yR5Yk/unsubscribe >> . >> To unsubscribe from this group and all its topics, 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/bb796dfb-cda9-49d4-97e7-a9c3def2febd%40googlegroups.com >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- > 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/CAGvoTo0VHvmLmnPVqftWHrHVbuFXhD6b4soGyUf3mkz_uEXRfA%40mail.gmail.com<https://groups.google.com/d/msgid/ansible-project/CAGvoTo0VHvmLmnPVqftWHrHVbuFXhD6b4soGyUf3mkz_uEXRfA%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > > > Case: From a specific host, run a command (e.g. ping) for all interfaces > for each host in a specific group. > > I have just sent a pull request ( > https://github.com/ansible/ansible/pull/7278) which would allow that. > The commit message includes an example which should make it clear to > everyone. > > -- > 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/53679218.5070104%40yahoo.gr<https://groups.google.com/d/msgid/ansible-project/53679218.5070104%40yahoo.gr?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- 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/CA%2BnsWgz5cWG892cpusFwMG_Tu00XYDMDG2KkmXdZebSh38GD7g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
