This should do it for you:
- hosts: role3
tasks:
- wait_for: host={{host}} port=22
with_items: servers_to_wait_for
On Wed, Aug 27, 2014 at 2:51 PM, Mikael Sandström <[email protected]> wrote:
> Hi,
>
> I've got a play that consists of a number of roles, like so:
>
> - name: Ble
> hosts: hosts
> sudo: yes
> roles:
> - role1
> - role2
> - role3
>
> In role2, I've got a handler that reboots the hosts and I need role3 to
> wait for the hosts to come up before starting (or role2 to somehow wait
> before exiting), and I'm not sure how to do this.
> I know I have to use the 'wait_for' module, but I'm not sure where to put
> it. Should (can?) I put in the handler or should it be at the start of
> role3 or should I just skip the handler, insert a reboot + wait_for at the
> end of role2?
>
> Any help appreciated.
>
> /M
>
> --
> 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/6d99be91-bbc8-43e0-85a5-84a45908c7bb%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/6d99be91-bbc8-43e0-85a5-84a45908c7bb%40googlegroups.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%2BnsWgzNEUPJ%2B53Ahf06MuZ_Uh2F%2BGceNAwMdK8zP5H%2BYmCp3w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.