Thanks Kai , looking for something like the server is rebooted and looks
for the processes or service and then move to the next server reboots and
check the service and goes to  the next hosts and does the same.

On Mon, Nov 6, 2017 at 8:51 PM, Kai Stian Olstad <
ansible-project+l...@olstad.com> wrote:

> On 06. nov. 2017 06:52, coach.r...@gmail.com wrote:
> > After rebooting the host and need to check if that process is back
> online.
> > Is there a way in ansible (or "wait_for module" ) to check the service or
> > process to be running after a reboot. could you please share your insight
> > about it.Thank you..
>
>
> For the reboot you can use
>
> - name: Restart server
>   shell: sleep 2 && /sbin/shutdown -r now
>   async: 1
>   poll: 0
>
>
> If you can use wait_for depends on what your process is doing,
> wait_for can do many things you find it in the documentation[1].
>
> To check if a service is running you have service module that can do that.
>
>
> [1] https://docs.ansible.com/ansible/latest/wait_for_module.html
>
> --
> Kai Stian Olstad
>
> --
> 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/5UvPWbQGyT4/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> ansible-project+unsubscr...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/ansible-project/00af81da-be7e-a516-35dc-96078bd0b734%40olstad.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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CALguqPLg_UDYKeezGk2aMtomkVHnZYDtK5Yan3wchtuWC8_u%2Bw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to