From 6839589455a58412d60704d7c7f404a5ed0ba0c8 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 14 Sep 2017 17:25:23 +0200 Subject: [PATCH] Add a task that removes the sis-geotk-plugin when it is not meant to be installed. --- smartgears/sis_geotk_dt_plugin/tasks/main.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/smartgears/sis_geotk_dt_plugin/tasks/main.yml b/smartgears/sis_geotk_dt_plugin/tasks/main.yml index 73168bb9..7bed52ca 100644 --- a/smartgears/sis_geotk_dt_plugin/tasks/main.yml +++ b/smartgears/sis_geotk_dt_plugin/tasks/main.yml @@ -1,4 +1,13 @@ --- +- block: + - name: Remove the old Sis geotk data transfer plugin + shell: rm -f {{ smartgears_instance_path }}/webapps/{{ data_trasfer_service_name }}/WEB-INF/lib/{{ sis_geotk_dt_plugin_name }}-*-jar-with-dependencies.jar + + become: True + become_user: '{{ smartgears_user }}' + when: not sis_geotk_dt_plugin_install + tags: [ 'smartgears', 'sis_geotk', 'tomcat' ] + - block: - name: Get the Sis geotk data transfer plugin and install it inside the smart executor maven_artifact: artifact_id={{ sis_geotk_dt_plugin_name }} version={{ sis_geotk_dt_plugin_version | default(omit) }} group_id={{ sis_geotk_dt_plugin_group_id }} extension={{ sis_geotk_dt_plugin_extension | default('war') }} repository_url={{ smartgears_global_base_url }} classifier={{ sis_geotk_dt_plugin_classifier }} dest={{ smartgears_downloads_dir }}/{{ sis_geotk_dt_plugin_file }} @@ -7,7 +16,6 @@ - name: Remove the old Sis geotk data transfer plugin shell: rm -f {{ smartgears_instance_path }}/webapps/{{ data_trasfer_service_name }}/WEB-INF/lib/{{ sis_geotk_dt_plugin_name }}-*-jar-with-dependencies.jar when: (sis_geotk_download | changed) - tags: [ 'smartgears', 'sis_geotk', 'tomcat' ] - name: Copy the Sis geotk data transfer plugin to its final destination copy: src={{ smartgears_downloads_dir }}/{{ sis_geotk_dt_plugin_file }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ sis_geotk_dt_plugin_file }} remote_src=yes force=yes