# tomcat is not getting started using ansible

**URL:** <https://forum.ansible.com/t/tomcat-is-not-getting-started-using-ansible/19253>\
**Category:** Ansible Project\
**Created:** [September 14, 2015, 7:05am UTC](https://forum.ansible.com/t/tomcat-is-not-getting-started-using-ansible/19253 "2015-09-14T07:05:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Irfan\_Sayed](https://avatars.discourse-cdn.com/v4/letter/i/a4c791/32.png) [@Irfan\_Sayed](https://forum.ansible.com/u/Irfan_Sayed)\
**Post date:** [September 14, 2015, 7:05am UTC](https://forum.ansible.com/t/tomcat-is-not-getting-started-using-ansible/19253/1 "2015-09-14T07:05:10Z")

</div>

Hi,

I am learning ansible. i have download the standalone tomcat example : [https://github.com/ansible/ansible-examples/tree/master/tomcat-standalone](https://github.com/ansible/ansible-examples/tree/master/tomcat-standalone).  
i am able to successfully deploy the tomcat/java and other tasks.  
however, tomcat service is not getting started through ansible. Though, manually i can start tomcat.

i am not getting what is the issue? i have verified other issues like permission, firewall, iptables etc but no luck .  
when goggled , i got this : [https://groups.google.com/forum/#!topic/ansible-project/wf-UOtPOuKk](https://groups.google.com/forum/#!topic/ansible-project/wf-UOtPOuKk)  
but, still i am facing the issue.

i have taken the latest code of this tomcat module.  
ansible version: ansible 1.9.2

please suggest. i am stuck

Regards  
Irfan

---

<div class="post-metadata">

**Author:** ![Athul](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@Athul](https://forum.ansible.com/u/Athul)\
**Post date:** [September 22, 2016, 4:10am UTC](https://forum.ansible.com/t/tomcat-is-not-getting-started-using-ansible/19253/2 "2016-09-22T04:10:48Z")

</div>

By changing the **started** to **restarted** in the task file make the problem go away.

Before:

- name: Start Tomcat  
service: name=tomcat state=started enabled=yes

After:

- name: Start Tomcat  
service: name=tomcat state=restarted enabled=yes
