ansible-roles/tomcat-multiple-instances/handlers/main.yml

29 lines
976 B
YAML

---
- name: tomcat restart instances with changed configs
service: name=tomcat-instance-'{{ item.item.http_port }}' state=restarted sleep=20
with_items: restart_needed.results
when: item.changed
ignore_errors: True
- name: tomcat restart instances with changed jmx config
service: name=tomcat-instance-'{{ item.item.http_port }}' state=restarted sleep=20
with_items: jmx_restart_needed.results
when: item.changed
ignore_errors: True
- name: tomcat instances restart
service: name=tomcat-instance-'{{ item.http_port }}' state=restarted sleep=20
with_items: tomcat_m_instances
ignore_errors: True
- name: enable tomcat instances
service: name=tomcat-instance-'{{ item.http_port }}' state=started enabled=yes sleep=20
with_items: tomcat_m_instances
ignore_errors: True
- name: disable tomcat instances
service: name=tomcat-instance-'{{ item.http_port }}' state=stopped enabled=no sleep=20
with_items: tomcat_m_instances
ignore_errors: True