diff --git a/smartgears/gfeed_service/tasks/main.yml b/smartgears/gfeed_service/tasks/main.yml index 97fd56b4..d8b5895b 100644 --- a/smartgears/gfeed_service/tasks/main.yml +++ b/smartgears/gfeed_service/tasks/main.yml @@ -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