51 lines
2.5 KiB
YAML
51 lines
2.5 KiB
YAML
---
|
|
- block:
|
|
- 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_downloads_dir }}/{{ dataminer_wps_file }}
|
|
register: dataminer_app_downloaded
|
|
|
|
- name: Remove the old dataminer installation
|
|
file: path={{ smartgears_instance_path }}/webapps/{{ dataminer_wps_name }} state=absent
|
|
when: dataminer_app_downloaded is changed
|
|
|
|
- name: Create the dataminer wps working directory
|
|
file: path={{ smartgears_instance_path }}/webapps/{{ dataminer_wps_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }}
|
|
|
|
- name: Unarchive the dataminer_wps war
|
|
unarchive: copy=no src={{ smartgears_downloads_dir }}/{{ dataminer_wps_file }} dest={{ smartgears_instance_path }}/webapps/{{ dataminer_wps_name }} creates='{{ smartgears_instance_path }}/webapps/{{ dataminer_wps_name }}/WEB-INF/lib'
|
|
register: dataminer_updated
|
|
notify: Restart smartgears
|
|
|
|
- name: Install the dataminer web.xml
|
|
template: src=web.xml.j2 dest={{ smartgears_instance_path }}/webapps/{{ dataminer_wps_name }}/WEB-INF/web.xml
|
|
notify: Restart smartgears
|
|
|
|
- name: Install the old properties files
|
|
copy: src={{ item }} dest={{ smartgears_instance_path }}/webapps/{{ dataminer_wps_name }}/ecocfg/{{ item }} force=yes
|
|
with_items: '{{ dataminer_properties_files }}'
|
|
|
|
- name: Install the script that fixes the WPS configuration
|
|
become_user: "{{ d4science_ansible_become_user | default('root') }}"
|
|
template: src=wps-config-fixer.j2 dest=/usr/local/bin/wps-config-fixer owner=root group=root mode=0555
|
|
with_items: '{{ tomcat_m_instances }}'
|
|
|
|
- name: Fix the WPS config file
|
|
shell: /usr/local/bin/wps-config-fixer
|
|
# notify: Restart smartgears
|
|
|
|
- name: Remove the file that lists the installed algorithms, after an upgrade
|
|
file: dest={{ smartgears_user_home }}/wps_algorithms_install_log/already_installed_algorithms.txt state=absent
|
|
register: reinstall_algorithms
|
|
when: dataminer_updated is changed
|
|
|
|
- name: After an update, reinstall the algorithms
|
|
shell: /usr/local/bin/algorithms-updater &
|
|
when:
|
|
- reinstall_algorithms is changed
|
|
- dataminer_algorithms_installer
|
|
|
|
become: True
|
|
become_user: '{{ smartgears_user }}'
|
|
tags: [ 'tomcat', 'dataminer', 'wps' ]
|
|
|