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

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

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

Try to run with “nohup”

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