On 06. nov. 2017 06:52, [email protected] 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 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/00af81da-be7e-a516-35dc-96078bd0b734%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to