# Process Monitoring in Ansible

**URL:** <https://forum.ansible.com/t/process-monitoring-in-ansible/33003>\
**Category:** Ansible Project\
**Created:** [May 22, 2020, 12:59am UTC](https://forum.ansible.com/t/process-monitoring-in-ansible/33003 "2020-05-22T00:59:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jenisha\_T](https://avatars.discourse-cdn.com/v4/letter/j/d26b3c/32.png) [@Jenisha\_T](https://forum.ansible.com/u/Jenisha_T)\
**Post date:** [May 22, 2020, 12:59am UTC](https://forum.ansible.com/t/process-monitoring-in-ansible/33003/1 "2020-05-22T00:59:15Z")

</div>

Is there a way in Ansible to find if process complete. I m running an os-copy process. How to check if the process completed. The hard way is to wait for 2hrs and read logs to find the word in the log is there a sentence  
“OS copy success”. Is there any elegant way to do it in ansible check if the process completes go to the next task instead of waiting for 2 hrs and then checking logs.

---

<div class="post-metadata">

**Author:** ![vbotka](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/vbotka/32/359_2.png) [@vbotka](https://forum.ansible.com/u/vbotka)\
**Post date:** [May 22, 2020, 5:39am UTC](https://forum.ansible.com/t/process-monitoring-in-ansible/33003/2 "2020-05-22T05:39:36Z")

</div>

> Is there a way in Ansible to find if process complete. I m running an  
> os-copy process. How to check if the process completed. The hard way is to  
> wait for 2hrs and read logs to find the word in the log is there a  
> sentence "OS copy success".

There is only hard way "Asynchronous Actions and Polling"  
[https://docs.ansible.com/ansible/latest/user\_guide/playbooks\_async.html](https://docs.ansible.com/ansible/latest/user_guide/playbooks_async.html)

> Is there any elegant way to do it in ansible check if  
> the process completes go to the next task instead of waiting for 2 hrs and  
> then checking logs.

AFAIK, there is no distributed interprocess communication. Probably because  
of the large variety of supported platforms. Instead, the process might  
trigger ansible-pull when ready  
[https://docs.ansible.com/ansible/latest/cli/ansible-pull.html](https://docs.ansible.com/ansible/latest/cli/ansible-pull.html)

HTH,

&nbsp;&nbsp;-vlado
