2016-06-13 16:24:30 +02:00
|
|
|
---
|
2016-10-05 10:37:46 +02:00
|
|
|
- block:
|
|
|
|
- name: Get and unpack the dataminer application
|
2017-09-14 13:41:55 +02:00
|
|
|
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 }}
|
2017-09-13 16:35:12 +02:00
|
|
|
register: dataminer_app_downloaded
|
|
|
|
|
|
|
|
- name: Remove the old dataminer installation
|
|
|
|
file: path={{ smartgears_instance_path }}/webapps/{{ dataminer_wps_name }} state=absent
|
2018-03-23 13:40:09 +01:00
|
|
|
when: dataminer_app_downloaded is changed
|
2017-05-08 18:20:57 +02:00
|
|
|
|
|
|
|
- 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
|
2017-09-14 13:41:55 +02:00
|
|
|
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'
|
2018-04-05 16:14:37 +02:00
|
|
|
register: dataminer_updated
|
2017-05-08 18:20:57 +02:00
|
|
|
notify: Restart smartgears
|
|
|
|
|
2017-07-25 18:37:59 +02:00
|
|
|
- name: Install the dataminer web.xml
|
2017-10-13 15:15:30 +02:00
|
|
|
template: src=web.xml.j2 dest={{ smartgears_instance_path }}/webapps/{{ dataminer_wps_name }}/WEB-INF/web.xml
|
2017-07-25 18:37:59 +02:00
|
|
|
notify: Restart smartgears
|
|
|
|
|
2017-09-19 14:44:35 +02:00
|
|
|
- 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 }}'
|
|
|
|
|
2016-10-05 10:37:46 +02:00
|
|
|
- name: Install the script that fixes the WPS configuration
|
2017-02-09 12:03:52 +01:00
|
|
|
become_user: "{{ d4science_ansible_become_user | default('root') }}"
|
2016-10-05 10:37:46 +02:00
|
|
|
template: src=wps-config-fixer.j2 dest=/usr/local/bin/wps-config-fixer owner=root group=root mode=0555
|
|
|
|
with_items: '{{ tomcat_m_instances }}'
|
2016-09-08 14:47:44 +02:00
|
|
|
|
2016-10-05 10:37:46 +02:00
|
|
|
- name: Fix the WPS config file
|
|
|
|
shell: /usr/local/bin/wps-config-fixer
|
|
|
|
# notify: Restart smartgears
|
2016-06-13 16:24:30 +02:00
|
|
|
|
2018-04-05 16:14:37 +02:00
|
|
|
- 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
|
|
|
|
when: dataminer_updated is changed
|
|
|
|
|
2018-04-06 17:21:38 +02:00
|
|
|
become: True
|
|
|
|
become_user: '{{ smartgears_user }}'
|
|
|
|
when: dataminer_app_install
|
|
|
|
tags: [ 'tomcat', 'dataminer', 'wps' ]
|
|
|
|
|
|
|
|
- block:
|
|
|
|
|
|
|
|
- name: Install the nscd service to work around dns timeouts
|
|
|
|
become_user: root
|
|
|
|
apt: pkg=nscd state=present update_cache=yes cache_valid_time=1800
|
|
|
|
when: dataminer_install_nscd is defined and dataminer_install_nscd
|
|
|
|
tags: [ 'tomcat', 'dataminer', 'wps', 'dm_nscd' ]
|
2017-12-15 18:07:39 +01:00
|
|
|
|
2018-04-06 17:21:38 +02:00
|
|
|
- name: Ensure thad the nscd service is enabled and running
|
|
|
|
become_user: root
|
|
|
|
service: name=nscd state=restarted enabled=yes
|
|
|
|
when: dataminer_install_nscd is defined and dataminer_install_nscd
|
|
|
|
tags: [ 'tomcat', 'dataminer', 'wps', 'dm_nscd' ]
|
2017-12-15 18:07:39 +01:00
|
|
|
|
|
|
|
|
2016-06-23 12:15:37 +02:00
|
|
|
become: True
|
|
|
|
become_user: '{{ smartgears_user }}'
|
2018-04-06 17:21:38 +02:00
|
|
|
when:
|
|
|
|
- dataminer_app_install
|
|
|
|
- dataminer_install_nscd
|
2016-06-23 12:15:37 +02:00
|
|
|
tags: [ 'tomcat', 'dataminer', 'wps' ]
|
|
|
|
|