# Ansible service module

**URL:** <https://forum.ansible.com/t/ansible-service-module/26008>\
**Category:** Ansible Project\
**Created:** [November 13, 2017, 7:27am UTC](https://forum.ansible.com/t/ansible-service-module/26008 "2017-11-13T07:27:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harish\_Chander\_Dalal](https://avatars.discourse-cdn.com/v4/letter/h/da6949/32.png) [@Harish\_Chander\_Dalal](https://forum.ansible.com/u/Harish_Chander_Dalal)\
**Post date:** [November 13, 2017, 7:27am UTC](https://forum.ansible.com/t/ansible-service-module/26008/1 "2017-11-13T07:27:39Z")

</div>

Hey !!

If I am working with ansible service module, if in case my tomcat take time more then min. Or 2 min. How can I verify if my service stop only then next step will run. ??

Or service module can take care this will hold till services not stopped. ??

Live env took time so not able to test please verify

Thanks

---

<div class="post-metadata">

**Author:** ![Dick\_Davies](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Dick\_Davies](https://forum.ansible.com/u/Dick_Davies)\
**Post date:** [November 13, 2017, 12:58pm UTC](https://forum.ansible.com/t/ansible-service-module/26008/2 "2017-11-13T12:58:30Z")

</div>

Look at the wait\_for module, it should be able to help you if you need  
to, uh, wait for a specific state.

---

<div class="post-metadata">

**Author:** ![Harish\_Chander\_Dalal](https://avatars.discourse-cdn.com/v4/letter/h/da6949/32.png) [@Harish\_Chander\_Dalal](https://forum.ansible.com/u/Harish_Chander_Dalal)\
**Post date:** [November 14, 2017, 5:21pm UTC](https://forum.ansible.com/t/ansible-service-module/26008/3 "2017-11-14T17:21:06Z")

</div>

As of now using only that, thanks for approval
