fix task for upgrading the gfeed-service war

This commit is contained in:
Roberto Cirillo 2019-05-06 17:01:13 +02:00
parent ce34a2e20e
commit 95856c83ad
1 changed files with 10 additions and 3 deletions

View File

@ -17,11 +17,18 @@
register: gfeed_service_download
- name: Remove the old gfeed files
file: path={{ smartgears_instance_path }}/webapps/{{ gfeed_service_name }} state=absent
file: path={{ item }} state=absent
with_items:
- '{{ smartgears_instance_path }}/webapps/{{ gfeed_service_name }}'
- '{{ smartgears_instance_path }}/webapps/{{ gfeed_service_name }}.{{ gfeed_extension }}'
when: gfeed_service_download is changed
- name: Copy the gfeed service war file into the webapps directory
copy: src={{ smartgears_downloads_dir }}/{{ gfeed_service_file }} dest={{ smartgears_instance_path }}/webapps/{{ gfeed_service_name }}.{{ gfeed_extension }} remote_src=yes force=yes
- name: Create the gFeed webapp directory
file: dest={{ smartgears_instance_path }}/webapps/{{ gfeed_service_name }} state=directory
when: gfeed_service_download
- name: Unarchive the gFeed war file
unarchive: copy=no src={{ smartgears_downloads_dir }}/{{ gfeed_service_file }} dest={{ smartgears_instance_path }}/webapps/{{ gfeed_service_name }}
notify: Restart smartgears
become: True