2017-04-20 19:00:20 +02:00
|
|
|
---
|
|
|
|
- block:
|
|
|
|
- name: Remove the old sdi files
|
2017-10-17 19:23:25 +02:00
|
|
|
file: path={{ item }} state=absent
|
|
|
|
with_items:
|
|
|
|
- '{{ smartgears_instance_path }}/webapps/{{ sdi_service_name }}'
|
|
|
|
- '{{ smartgears_instance_path }}/webapps/{{ sdi_service_name }}.{{ sdi_extension }}'
|
2017-04-20 19:00:20 +02:00
|
|
|
|
|
|
|
become: True
|
|
|
|
become_user: '{{ d4science_user }}'
|
2017-10-17 19:23:25 +02:00
|
|
|
when: not sdi_service_install
|
2017-04-20 19:00:20 +02:00
|
|
|
tags: [ 'smartgears', 'sdi_service', 'tomcat' ]
|
|
|
|
|
|
|
|
- block:
|
2017-10-17 19:23:25 +02:00
|
|
|
- name: Get the sdi-service
|
|
|
|
maven_artifact: artifact_id={{ sdi_service_name }} version={{ sdi_service_version | default('latest') }} group_id={{ sdi_group_id }} extension={{ sdi_extension | default('war') }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_downloads_dir }}/{{ sdi_service_file }}
|
|
|
|
register: sdi_service_download
|
|
|
|
|
2017-04-20 19:00:20 +02:00
|
|
|
- name: Remove the old sdi files
|
|
|
|
file: path={{ smartgears_instance_path }}/webapps/{{ sdi_service_name }} state=absent
|
2017-10-17 19:23:25 +02:00
|
|
|
when: ( sdi_service_download | changed )
|
|
|
|
|
|
|
|
- name: Copy the sdi service war file into the webapps directory
|
|
|
|
copy: src={{ smartgears_downloads_dir }}/{{ sdi_service_file }} dest={{ smartgears_instance_path }}/webapps/{{ sdi_service_name }}.{{ sdi_extension }} remote_src=yes force=yes
|
|
|
|
notify: Restart smartgears
|
2017-04-20 19:00:20 +02:00
|
|
|
|
|
|
|
become: True
|
|
|
|
become_user: '{{ d4science_user }}'
|
2017-10-17 19:23:25 +02:00
|
|
|
when: sdi_service_install
|
2017-04-20 19:00:20 +02:00
|
|
|
tags: [ 'smartgears', 'sdi_service', 'tomcat' ]
|
2017-10-17 19:23:25 +02:00
|
|
|
|