diff --git a/gcube/grsf_publisher_ws/defaults/main.yml b/gcube/grsf_publisher_ws/defaults/main.yml new file mode 100644 index 00000000..07d9e2a5 --- /dev/null +++ b/gcube/grsf_publisher_ws/defaults/main.yml @@ -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 }}' + diff --git a/gcube/grsf_publisher_ws/handlers/main.yml b/gcube/grsf_publisher_ws/handlers/main.yml new file mode 100644 index 00000000..a9b4ffdd --- /dev/null +++ b/gcube/grsf_publisher_ws/handlers/main.yml @@ -0,0 +1,3 @@ +--- +- name: Restart smartgears + service: name='tomcat-instance-{{ smartgears_http_port }}' state=restarted diff --git a/gcube/grsf_publisher_ws/tasks/main.yml b/gcube/grsf_publisher_ws/tasks/main.yml new file mode 100644 index 00000000..073a3972 --- /dev/null +++ b/gcube/grsf_publisher_ws/tasks/main.yml @@ -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