added new gfeed service tasks

This commit is contained in:
Roberto Cirillo 2019-04-19 14:51:18 +02:00
parent ef11b705b3
commit 4f99479ded
1 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,31 @@
---
- block:
- name: Remove the old gfeed files
file: path={{ item }} state=absent
with_items:
- '{{ smartgears_instance_path }}/webapps/{{ gfeed_service_name }}'
- '{{ smartgears_instance_path }}/webapps/{{ gfeed_service_name }}.{{ gfeed_extension }}'
become: True
become_user: '{{ d4science_user }}'
when: not gfeed_service_install
tags: [ 'smartgears', 'gfeed_service', 'tomcat' ]
- block:
- name: Get the gfeed-service
maven_artifact: artifact_id={{ gfeed_service_name }} version={{ gfeed_service_version | default('latest') }} group_id={{ gfeed_group_id }} extension={{ gfeed_extension | default('war') }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_downloads_dir }}/{{ gfeed_service_file }} verify_checksum=always
register: gfeed_service_download
- name: Remove the old gfeed files
file: path={{ smartgears_instance_path }}/webapps/{{ gfeed_service_name }} state=absent
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
notify: Restart smartgears
become: True
become_user: '{{ d4science_user }}'
when: gfeed_service_install
tags: [ 'smartgears', 'gfeed_service', 'tomcat' ]