From 213a21898d52fb697cae47bcb6d1345f2b5a5c11 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Mon, 25 Sep 2017 17:36:53 +0200 Subject: [PATCH] catalogue_ws: Fix the upgrade scenario. --- smartgears/catalogue_ws/tasks/main.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/smartgears/catalogue_ws/tasks/main.yml b/smartgears/catalogue_ws/tasks/main.yml index c53e6ea..c5e8060 100644 --- a/smartgears/catalogue_ws/tasks/main.yml +++ b/smartgears/catalogue_ws/tasks/main.yml @@ -5,6 +5,7 @@ with_items: - '{{ smartgears_instance_path }}/webapps/{{ catalogue_ws_name }}' - '{{ smartgears_instance_path }}/webapps/{{ catalogue_ws_name }}.{{ catalogue_ws_extension }}' + notify: Restart smartgears become: True become_user: '{{ d4science_user }}' @@ -14,6 +15,11 @@ - block: - name: Get the catalogue-ws maven_artifact: artifact_id={{ catalogue_ws_name }} version={{ catalogue_ws_version | default(omit) }} group_id={{ catalogue_ws_group_id }} extension={{ catalogue_ws_extension | default('war') }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_downloads_dir }}/{{ catalogue_ws_file }} + register: catalogue_ws_download + + - name: Remove the old catalogue ws files + file: path={{ smartgears_instance_path }}/webapps/{{ catalogue_ws_name }} state=absent + when: ( catalogue_ws_download | changed ) - name: Copy the catalogue ws war into the tomcat webapps directory copy: src={{ smartgears_downloads_dir }}/{{ catalogue_ws_file }} dest={{ smartgears_instance_path }}/webapps/{{ catalogue_ws_name }}.{{ catalogue_ws_extension }} remote_src=yes force=yes