forked from ISTI-ansible-roles/ansible-roles
library/roles/tomcat, library/roles/tomcat-multiple-instances: Fix other ansible 2 incompatibilities.
This commit is contained in:
parent
67ea1e71c3
commit
7413e6398a
|
@ -1,28 +1,28 @@
|
||||||
---
|
---
|
||||||
- name: tomcat restart instances with changed configs
|
- name: tomcat restart instances with changed configs
|
||||||
service: name=tomcat-instance-'{{ item.item.http_port }}' state=restarted sleep=20
|
service: name='tomcat-instance-{{ item.item.http_port }}' state=restarted sleep=20
|
||||||
with_items: restart_needed.results
|
with_items: restart_needed.results
|
||||||
when: item.changed
|
when: item.changed
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
|
|
||||||
- name: tomcat restart instances with changed jmx config
|
- name: tomcat restart instances with changed jmx config
|
||||||
service: name=tomcat-instance-'{{ item.item.http_port }}' state=restarted sleep=20
|
service: name='tomcat-instance-{{ item.item.http_port }}' state=restarted sleep=20
|
||||||
with_items: jmx_restart_needed.results
|
with_items: jmx_restart_needed.results
|
||||||
when: item.changed
|
when: item.changed
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
|
|
||||||
- name: tomcat instances restart
|
- name: tomcat instances restart
|
||||||
service: name=tomcat-instance-'{{ item.http_port }}' state=restarted sleep=20
|
service: name='tomcat-instance-{{ item.http_port }}' state=restarted sleep=20
|
||||||
with_items: tomcat_m_instances
|
with_items: tomcat_m_instances
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
|
|
||||||
- name: enable tomcat instances
|
- name: enable tomcat instances
|
||||||
service: name=tomcat-instance-'{{ item.http_port }}' state=started enabled=yes sleep=20
|
service: name='tomcat-instance-{{ item.http_port }}' state=started enabled=yes sleep=20
|
||||||
with_items: tomcat_m_instances
|
with_items: tomcat_m_instances
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
|
|
||||||
- name: disable tomcat instances
|
- name: disable tomcat instances
|
||||||
service: name=tomcat-instance-'{{ item.http_port }}' state=stopped enabled=no sleep=20
|
service: name='tomcat-instance-{{ item.http_port }}' state=stopped enabled=no sleep=20
|
||||||
with_items: tomcat_m_instances
|
with_items: tomcat_m_instances
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# Note: the library role 'tomcat' is a dependency
|
# Note: the library role 'tomcat' is a dependency
|
||||||
#
|
#
|
||||||
- name: disable the tomcat main instance
|
- name: disable the tomcat main instance
|
||||||
service: name=tomcat'{{ tomcat_version }}' state=stopped enabled=no
|
service: name='tomcat{{ tomcat_version }}' state=stopped enabled=no
|
||||||
when: not tomcat_service_enabled
|
when: not tomcat_service_enabled
|
||||||
tags: [ 'tomcat', 'tomcat_instances' ]
|
tags: [ 'tomcat', 'tomcat_instances' ]
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
---
|
---
|
||||||
- name: tomcat restart
|
- name: tomcat restart
|
||||||
service: name=tomcat'{{ tomcat_version }}' state=restarted sleep=20
|
service: name='tomcat{{ tomcat_version }}' state=restarted sleep=20
|
||||||
when: tomcat_service_enabled
|
when: tomcat_service_enabled
|
||||||
|
|
||||||
- name: enable tomcat
|
- name: enable tomcat
|
||||||
service: name=tomcat'{{ tomcat_version }}' state=started enabled=yes
|
service: name='tomcat{{ tomcat_version }}' state=started enabled=yes
|
||||||
when: tomcat_service_enabled
|
when: tomcat_service_enabled
|
||||||
|
|
||||||
- name: disable tomcat
|
- name: disable tomcat
|
||||||
service: name=tomcat'{{ tomcat_version }}' state=started enabled=no
|
service: name='tomcat{{ tomcat_version }}' state=started enabled=no
|
||||||
when: not tomcat_service_enabled
|
when: not tomcat_service_enabled
|
||||||
|
|
Loading…
Reference in New Issue