catalogue_ws: Fix the upgrade scenario.

This commit is contained in:
Andrea Dell'Amico 2017-09-25 17:36:53 +02:00
parent 20d589a837
commit 213a21898d
1 changed files with 6 additions and 0 deletions

View File

@ -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