library/roles/gcube/grsf_publisher_ws: New role that installs the GRSF publisher.

This commit is contained in:
Andrea Dell'Amico 2016-12-12 17:28:01 +01:00
parent 300f433655
commit 1a096e3b32
3 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,11 @@
---
grsf_publisher_ws_install: False
grsf_publisher_ws_upgrade: False
grsf_publisher_ws_gcube_repository: gcube-staging
grsf_publisher_ws_ver: 1.0.0-4.2.0-139879
grsf_publisher_ws_name: grsf-publisher-ws
grsf_publisher_ws_file: '{{ grsf_publisher_ws_name }}-{{ grsf_publisher_ws_ver }}.war'
grsf_publisher_ws_url: 'http://maven.research-infrastructures.eu/nexus/content/repositories/{{ grsf_publisher_ws_gcube_repository }}/org/gcube/data-catalogue/{{grsf_publisher_ws_name}}/{{ grsf_publisher_ws_ver }}/{{ grsf_publisher_ws_file }}'

View File

@ -0,0 +1,3 @@
---
- name: Restart smartgears
service: name='tomcat-instance-{{ smartgears_http_port }}' state=restarted

View File

@ -0,0 +1,17 @@
---
- block:
- name: Remove the old grsf-publisher-ws files
file: path={{ smartgears_instance_path }}/webapps/{{ grsf_publisher_ws_name }} state=absent
when: grsf_publisher_ws_upgrade
- name: Create the grsf-publisher-ws working directory
file: path={{ smartgears_instance_path }}/webapps/{{ grsf_publisher_ws_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }}
- name: Unarchive the grsf_publisher_ws war
unarchive: copy=no src={{ grsf_publisher_ws_url }} dest={{ smartgears_instance_path }}/webapps/{{ grsf_publisher_ws_name }} creates={{ smartgears_instance_path }}/webapps/{{ grsf_publisher_ws_name }}/WEB-INF/lib
notify: Restart smartgears
become: True
become_user: '{{ d4science_user }}'
tags: [ 'smartgears', 'grsf_publisher_ws', 'tomcat' ]
when: grsf_publisher_ws_install