This feels like something that can be done with a group or inventory
variable for me, and the basic host looping that is already in Ansible,
coupled with a "with_items".
"My use case: I want a task to run for all network interfaces for each host
in a specific group. Each host has a "network_interfaces" list variable"
- hosts: all_my_servers
tasks:
- example_module: some_arguments {{ item }}
with_items: network_interfaces
If you need to delegate this command to different hosts than the one you
are currently looping over (unlikely -- but possible) let me know -- but
perhaps I'm missing something.
On Tue, Apr 29, 2014 at 10:09 AM, Adam Morris <[email protected]> wrote:
>
> On Apr 29, 2014 7:03 AM, "'Petros Moisiadis' via Ansible Project" <
> [email protected]> wrote:
> >
>
> >
> > My use case: I want a task to run for all network interfaces for each
> host in a specific group. Each host has a "network_interfaces" list
> variable.
> > I cannot be convinced that this is something that one should not be able
> to describe in a playbook.
>
> >
>
> That is not really a use case but a description. What are you trying to
> do with these network interfaces? Add them to a list? Build a dhcp
> configuration file?
>
> Adam
>
> --
> 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/CAGvoTo3drZm_Xq6%3Dnk44OEXj7G5%2Bg2u2i3txhMd-1e10b%2BhkaA%40mail.gmail.com<https://groups.google.com/d/msgid/ansible-project/CAGvoTo3drZm_Xq6%3Dnk44OEXj7G5%2Bg2u2i3txhMd-1e10b%2BhkaA%40mail.gmail.com?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%2BnsWgx2Kn6CKjjO%3DQH%3DzR9NLOeBCHkDcx3cocLMDS%3DyZm7RSQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.