diff --git a/smartgears/catalogue_ws/tasks/main.yml b/smartgears/catalogue_ws/tasks/main.yml index c53e6ea5..c5e80609 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