# hi team..i need one help my requirement is that i wrote one play book to start the tomcat

**URL:** <https://forum.ansible.com/t/hi-team-i-need-one-help-my-requirement-is-that-i-wrote-one-play-book-to-start-the-tomcat/28750>\
**Category:** Ansible Developer\
**Created:** [October 9, 2018, 2:49pm UTC](https://forum.ansible.com/t/hi-team-i-need-one-help-my-requirement-is-that-i-wrote-one-play-book-to-start-the-tomcat/28750 "2018-10-09T14:49:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anjalidev5757](https://avatars.discourse-cdn.com/v4/letter/a/f1d935/32.png) [@anjalidev5757](https://forum.ansible.com/u/anjalidev5757)\
**Post date:** [October 9, 2018, 2:49pm UTC](https://forum.ansible.com/t/hi-team-i-need-one-help-my-requirement-is-that-i-wrote-one-play-book-to-start-the-tomcat/28750/1 "2018-10-09T14:49:07Z")

</div>

hi team…i need one help my requirement is that i wrote one play book to start the tomcat application automatically in client machine …but the thing is that when i execute the playbook in master machine it is successfully executed but when i check in the client machine the tomcat is not started automatically could any one help what could be the reason for this., why it is not working in client machine…thanks

---

<div class="post-metadata">

**Author:** ![Ludovic\_Petetin](https://avatars.discourse-cdn.com/v4/letter/l/f14d63/32.png) [@Ludovic\_Petetin](https://forum.ansible.com/u/Ludovic_Petetin)\
**Post date:** [October 9, 2018, 3:24pm UTC](https://forum.ansible.com/t/hi-team-i-need-one-help-my-requirement-is-that-i-wrote-one-play-book-to-start-the-tomcat/28750/2 "2018-10-09T15:24:35Z")

</div>

I experienced a similar problem once and it came from the fact that the service on the client was launched in background.  
Ansible does not manage this.

Let me know if it is the case

---

<div class="post-metadata">

**Author:** ![Murali\_Thangavel](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@Murali\_Thangavel](https://forum.ansible.com/u/Murali_Thangavel)\
**Post date:** [October 14, 2018, 1:54pm UTC](https://forum.ansible.com/t/hi-team-i-need-one-help-my-requirement-is-that-i-wrote-one-play-book-to-start-the-tomcat/28750/3 "2018-10-14T13:54:29Z")

</div>

Try to run with “nohup”

---

<div class="post-metadata">

**Author:** ![Tchia04](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@Tchia04](https://forum.ansible.com/u/Tchia04)\
**Post date:** [October 15, 2018, 3:46am UTC](https://forum.ansible.com/t/hi-team-i-need-one-help-my-requirement-is-that-i-wrote-one-play-book-to-start-the-tomcat/28750/4 "2018-10-15T03:46:09Z")

</div>

Without seeing the playbook it’s hard to tell what actually happened. However I am guessing you are probably using the shell module instead of the service module. When using the shell module it treats any zero return code as successful even if the standard output have error message in it. Or you have piped the tomcat startup command to another program and the finally piped return code is zero even thought the tomcat start up failed so the ansible playbook thinks it was started successfully

Tony Chia
