added task for managing the ubuntu 18 case

This commit is contained in:
Roberto Cirillo 2019-05-03 16:53:47 +02:00
parent 5b63d49f11
commit de1845044f
1 changed files with 9 additions and 4 deletions

View File

@ -1,14 +1,19 @@
--- ---
- block: - block:
- name: Install the catalina webapp configurations - name: Install the catalina webapp configurations with distro <=16
template: src=catalina-app-conf.xml.j2 dest={{ smartgears_instance_path }}/conf/Catalina/localhost/{{ item.app_name }}.xml template: src=catalina-app-conf.xml.j2 dest={{ smartgears_instance_path }}/conf/Catalina/localhost/{{ item.app_name }}.xml
with_items: '{{ catalina_apps_conf }}' with_items: '{{ catalina_apps_conf }}'
when: ( item.state | default(True) ) when: ( item.state | default(True) ) and ansible_distribution_major_version <= '16'
- name: Remove the catalina webapp configurations - name: Install the catalina webapp configurations with distro == 18
template: src=catalina-app-conf_tomcat8.xml.j2 dest={{ smartgears_instance_path }}/conf/Catalina/localhost/{{ item.app_name }}.xml
with_items: '{{ catalina_apps_conf }}'
when: ( item.state | default(True) ) and ansible_distribution_major_version == '18'
- name: Remove the catalina webapp configurations
file: dest={{ smartgears_instance_path }}/conf/Catalina/localhost/{{ item.app_name }}.xml state=absent file: dest={{ smartgears_instance_path }}/conf/Catalina/localhost/{{ item.app_name }}.xml state=absent
with_items: '{{ catalina_apps_conf }}' with_items: '{{ catalina_apps_conf }}'
when: ( not item.state | default(True) ) when: ( not item.state | default(True) ) and ansible_distribution_major_version <= '16'
become: True become: True
become_user: '{{ smartgears_user }}' become_user: '{{ smartgears_user }}'