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-05-08 18:20:57 +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_user_home }}/{{ dataminer_wps_file }}
|
|
|
|
|
|
|
|
- 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_user_home }}/{{ dataminer_wps_file }} dest={{ smartgears_instance_path }}/webapps/{{ dataminer_wps_name }} creates={{ smartgears_instance_path }}/webapps/{{ dataminer_wps_name }}/WEB-INF/lib
|
|
|
|
notify: Restart smartgears
|
|
|
|
|
|
|
|
- name: Create a directory where to install the algorithms directory
|
|
|
|
file: path={{ smartgears_user_home }}/wps_algorithms state=directory
|
|
|
|
|
|
|
|
- name: Download the WPS algorithms from subversion
|
2017-05-08 19:06:28 +02:00
|
|
|
subversion: repo={{ dataminer_wps_algorithms_svn }} dest={{ smartgears_user_home }}/wps_algorithms/algorithms
|
2016-10-05 13:31:10 +02:00
|
|
|
- name: Create a directory where to install the gebco_08.nc data file
|
|
|
|
file: path={{ smartgears_user_home }}/data state=directory
|
|
|
|
|
2016-10-05 10:37:46 +02:00
|
|
|
- name: Install the gebco_08.nc file from thredds. It is big, mostly 2GB
|
2016-10-11 17:42:01 +02:00
|
|
|
get_url: url={{ dataminer_data_file_from_thredds }} dest={{ smartgears_user_home }}/data/gebco_08.nc timeout=2400
|
2016-10-05 13:31:10 +02:00
|
|
|
|
|
|
|
- name: Create a symlink to the gebco_08.nc file
|
2017-05-08 18:20:57 +02:00
|
|
|
file: src={{ smartgears_user_home }}/data/gebco_08.nc dest={{ smartgears_instance_path }}/webapps/{{ dataminer_wps_name }}/ecocfg/gebco_08.nc state=link
|
2016-10-05 10:37:46 +02:00
|
|
|
notify: Restart smartgears
|
2016-06-22 15:37:30 +02:00
|
|
|
|
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
|
|
|
|
2016-06-23 12:15:37 +02:00
|
|
|
become: True
|
|
|
|
become_user: '{{ smartgears_user }}'
|
|
|
|
when: dataminer_app_install
|
|
|
|
tags: [ 'tomcat', 'dataminer', 'wps' ]
|
|
|
|
|