forked from ISTI-ansible-roles/ansible-roles
library/roles/smartgears/data-transfer-service: New role that downloads and install the data transfer service.
This commit is contained in:
parent
2b08e985ac
commit
7ec0742786
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
data_transfer_service_install: False
|
||||
data_transfer_service_version: 1.2.1-4.3.0-141906
|
||||
data_transfer_service_name: data-transfer-service
|
||||
data_transfer_group_id: org.gcube.data.transfer
|
||||
data_transfer_extension: war
|
||||
data_transfer_service_file: '{{ data_transfer_service_name }}-{{ data_transfer_service_version }}.{{ data_transfer_extension }}'
|
||||
data_transfer_service_repository_url: 'http://maven.research-infrastructures.eu/nexus/content/repositories/{{ gcube_repository }}'
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
- block:
|
||||
- name: Remove the old data transfer files
|
||||
file: path={{ smartgears_instance_path }}/webapps/{{ data_transfer_service_name }} state=absent
|
||||
|
||||
become: True
|
||||
become_user: '{{ d4science_user }}'
|
||||
when: ( not data_transfer_service_install ) or ( smartgears_upgrade )
|
||||
tags: [ 'smartgears', 'data_transfer_service', 'tomcat' ]
|
||||
|
||||
- block:
|
||||
# NOTE: Install as the smartgears user so we do not mess with the permissions
|
||||
- name: Get the data-transfer-service war
|
||||
maven_artifact: artifact_id={{ data_transfer_service_name }} version={{ data_transfer_service_version | default(omit) }} group_id={{ data_transfer_group_id }} extension={{ data_transfer_extension | default('war') }} repository_url={{ data_transfer_service_repository_url }} dest={{ smartgears_user_home }}/{{ data_transfer_service_file }}
|
||||
|
||||
- name: Create the data trasfer working directory
|
||||
file: path={{ smartgears_instance_path }}/webapps/{{ data_transfer_service_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }}
|
||||
|
||||
- name: Unarchive the data_transfer_service war
|
||||
unarchive: copy=no src={{ smartgears_user_home }}/{{ data_transfer_service_file }} dest={{ smartgears_instance_path }}/webapps/{{ data_transfer_service_name }} creates={{ smartgears_instance_path }}/webapps/{{ data_transfer_service_name }}/WEB-INF/lib
|
||||
notify: Restart smartgears
|
||||
|
||||
become: True
|
||||
become_user: '{{ d4science_user }}'
|
||||
when: data_transfer_service_install
|
||||
tags: [ 'smartgears', 'data_transfer_service', 'tomcat' ]
|
Loading…
Reference in New Issue