forked from ISTI-ansible-roles/ansible-roles
library/roles/smartgears/tabular_data: Fix the task that manages the tabulardata upgrade.
d4science-ghn-cluster/smartgears-node-upgrade.yml: Add tabulardata_upgrade: True to the variables list.
This commit is contained in:
parent
14ec0b9e99
commit
b9e52a6ab5
|
@ -1,10 +1,11 @@
|
|||
---
|
||||
gcube_repository: gcube-staging
|
||||
tabular_data_install: False
|
||||
tabular_data_upgrade: False
|
||||
tabular_data_version: latest
|
||||
tabular_data_name: tabular-data-manager
|
||||
|
||||
tabular_group_id: org.gcube.resource.management
|
||||
tabular_group_id: org.gcube.data.analysis.tabulardata
|
||||
tabular_extension: war
|
||||
tabular_data_file: '{{ tabular_data_name }}-{{ tabular_data_version }}.{{ tabular_extension }}'
|
||||
tabular_service_repository_url: 'http://maven.research-infrastructures.eu/nexus/content/repositories/{{ gcube_repository }}'
|
||||
|
|
|
@ -1,25 +1,30 @@
|
|||
---
|
||||
- block:
|
||||
|
||||
- name: Remove the old tabulardata files
|
||||
file: path={{ smartgears_instance_path }}/webapps/{{ tabular_data_name }} state=absent
|
||||
when: ( tabular_data_install ) or ( smartgears_upgrade )
|
||||
|
||||
when: tabular_data_upgrade
|
||||
|
||||
# NOTE: Install as the smartgears user so we do not mess with the permissions
|
||||
- name: Get the tabular-data-service
|
||||
maven_artifact: artifact_id={{ tabular_data_name }} version={{ tabular_data_version | default(omit) }} group_id={{ tabular_group_id }} extension={{ tabular_extension | default('war') }} repository_url={{ tabular_service_repository_url }} dest={{ smartgears_user_home }}/{{ tabular_data_file }}
|
||||
when: tabular_data_install
|
||||
|
||||
- name: Create the tabular data working directory
|
||||
file: path={{ smartgears_instance_path }}/webapps/{{ tabular_data_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }}
|
||||
when: tabular_data_install
|
||||
|
||||
- name: Unarchive the tabular data war
|
||||
unarchive: copy=no src={{ smartgears_user_home }}/{{ tabular_data_file }} dest={{ smartgears_instance_path }}/webapps/{{ tabular_data_name }} creates={{ smartgears_instance_path }}/webapps/{{ tabular_data_name }}/WEB-INF/lib
|
||||
when: tabular_data_install
|
||||
notify: Restart smartgears
|
||||
|
||||
become: True
|
||||
become_user: '{{ d4science_user }}'
|
||||
when: tabular_data_install
|
||||
tags: [ 'smartgears', 'tabular_data', 'tomcat' ]
|
||||
|
||||
- block:
|
||||
- name: Remove the old tabulardata files
|
||||
file: path={{ smartgears_instance_path }}/webapps/{{ tabular_data_name }} state=absent
|
||||
|
||||
become: True
|
||||
become_user: '{{ d4science_user }}'
|
||||
when: not tabular_data_install
|
||||
tags: [ 'smartgears', 'tabular_data', 'tomcat' ]
|
||||
|
|
Loading…
Reference in New Issue