>
> This...
>
> >
> https://support.ansible.com/hc/en-us/articles/201958037-Reboot-a-server-and-wait-for-it-to-come-back
>
> ...works for me.
>
How exactly are you using it?
- name: reboot system if required
shell: sleep 2 && shutdown -r now 'Rebooting to complete system upgrade'
async: 1
poll: 0
ignore_errors: true
- name: wait for server to come back
local_action: wait_for host={{ inventory_hostname }} state=started
delay=30 timeout=300
This hangs on the waiting task, even though the servers are back online.
Regards,
Francisco
On Fri, May 27, 2016 at 2:30 PM, Johannes Kastl <[email protected]> wrote:
> On 27.05.16 17:10 Francisco Lopes wrote:
> > Hello,
> >
> > How do I execute a reboot (if needed on Ubuntu) and wait for it to return
> > instead of getting the unreachable error?
>
> This...
>
> >
> https://support.ansible.com/hc/en-us/articles/201958037-Reboot-a-server-and-wait-for-it-to-come-back
>
> ...works for me.
>
> Johannes
>
>
> --
> 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/57488435.3050607%40ojkastl.de
> .
> 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/CAKK1GdJidB9nnMHR3rBzhdg2mcJ1fKZ2Ovs6YYcKJj8cOfDuQw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.