forked from ISTI-ansible-roles/ansible-roles
dataminer: Remove the old algorithms installer when a new distribution has been downloaded from maven.
This commit is contained in:
parent
e9e8fa5c7c
commit
d1597d1784
|
@ -15,6 +15,7 @@ dataminer_wps_extension: war
|
||||||
dataminer_wps_file: '{{ dataminer_wps_name }}-{{ dataminer_wps_version }}.{{ dataminer_wps_extension }}'
|
dataminer_wps_file: '{{ dataminer_wps_name }}-{{ dataminer_wps_version }}.{{ dataminer_wps_extension }}'
|
||||||
|
|
||||||
# Algorithms installer
|
# Algorithms installer
|
||||||
|
dataminer_algorithms_upgrade: False
|
||||||
dataminer_algorithms_version: latest
|
dataminer_algorithms_version: latest
|
||||||
dataminer_algorithms_gcube_repository: gcube-snapshots
|
dataminer_algorithms_gcube_repository: gcube-snapshots
|
||||||
dataminer_algorithms_name: dataminer-algorithms-importer
|
dataminer_algorithms_name: dataminer-algorithms-importer
|
||||||
|
|
|
@ -1,4 +1,27 @@
|
||||||
---
|
---
|
||||||
|
- block:
|
||||||
|
- name: Remove the old dataminer installation
|
||||||
|
file: path={{ smartgears_instance_path }}/webapps/{{ dataminer_wps_name }} state=absent
|
||||||
|
|
||||||
|
become: True
|
||||||
|
become_user: '{{ smartgears_user }}'
|
||||||
|
when:
|
||||||
|
- dataminer_app_install
|
||||||
|
- dataminer_app_upgrade
|
||||||
|
tags: [ 'tomcat', 'dataminer', 'wps' ]
|
||||||
|
|
||||||
|
|
||||||
|
- block:
|
||||||
|
- name: Remove the old dataminer algorithm installer
|
||||||
|
file: path={{ smartgears_user_home }}/algorithmInstaller state=absent
|
||||||
|
|
||||||
|
become: True
|
||||||
|
become_user: '{{ smartgears_user }}'
|
||||||
|
when:
|
||||||
|
- dataminer_app_install
|
||||||
|
- dataminer_algorithms_upgrade
|
||||||
|
tags: [ 'tomcat', 'dataminer', 'wps', 'dataminer_algorithms', 'dataminer_algorithms_installer' ]
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: Get and unpack the dataminer application
|
- name: Get and unpack the dataminer application
|
||||||
maven_artifact: artifact_id={{ dataminer_wps_name }} version={{ dataminer_wps_version | default(omit) }} group_id={{ dataminer_wps_group_id }} extension={{ dataminer_wps_extension | default('war') }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_user_home }}/{{ dataminer_wps_file }}
|
maven_artifact: artifact_id={{ dataminer_wps_name }} version={{ dataminer_wps_version | default(omit) }} group_id={{ dataminer_wps_group_id }} extension={{ dataminer_wps_extension | default('war') }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_user_home }}/{{ dataminer_wps_file }}
|
||||||
|
@ -19,6 +42,12 @@
|
||||||
|
|
||||||
- name: Get and unpack the algorithms installer
|
- name: Get and unpack the algorithms installer
|
||||||
maven_artifact: artifact_id={{ dataminer_algorithms_name }} version={{ dataminer_algorithms_version | default(omit) }} group_id={{ dataminer_algorithms_group_id }} extension={{ dataminer_algorithms_extension | default('war') }} repository_url={{ dataminer_algorithms_base_url }} dest={{ smartgears_user_home }}/{{ dataminer_algorithms_file }}
|
maven_artifact: artifact_id={{ dataminer_algorithms_name }} version={{ dataminer_algorithms_version | default(omit) }} group_id={{ dataminer_algorithms_group_id }} extension={{ dataminer_algorithms_extension | default('war') }} repository_url={{ dataminer_algorithms_base_url }} dest={{ smartgears_user_home }}/{{ dataminer_algorithms_file }}
|
||||||
|
register: algorithms_installer_downloaded
|
||||||
|
tags: [ 'tomcat', 'dataminer', 'wps', 'dataminer_algorithms', 'dataminer_algorithms_installer' ]
|
||||||
|
|
||||||
|
- name: Remove the old dataminer algorithm installer
|
||||||
|
file: path={{ smartgears_user_home }}/algorithmInstaller state=absent
|
||||||
|
when: (algorithms_installer_downloaded | changed)
|
||||||
tags: [ 'tomcat', 'dataminer', 'wps', 'dataminer_algorithms', 'dataminer_algorithms_installer' ]
|
tags: [ 'tomcat', 'dataminer', 'wps', 'dataminer_algorithms', 'dataminer_algorithms_installer' ]
|
||||||
|
|
||||||
- name: Unarchive the algorithms installer
|
- name: Unarchive the algorithms installer
|
||||||
|
|
Loading…
Reference in New Issue