From de1845044f9442e5f2bf6873246190b163928545 Mon Sep 17 00:00:00 2001 From: Roberto Cirillo Date: Fri, 3 May 2019 16:53:47 +0200 Subject: [PATCH] added task for managing the ubuntu 18 case --- smartgears/catalina-app-conf/tasks/main.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/smartgears/catalina-app-conf/tasks/main.yml b/smartgears/catalina-app-conf/tasks/main.yml index 1dd6cbe..1e724f3 100644 --- a/smartgears/catalina-app-conf/tasks/main.yml +++ b/smartgears/catalina-app-conf/tasks/main.yml @@ -1,14 +1,19 @@ --- - 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 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 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_user: '{{ smartgears_user }}'