forked from ISTI-ansible-roles/ansible-roles
grsf_publisher_ws: Convert to maven_artifact.
This commit is contained in:
parent
0a9e292f64
commit
697b86d33b
|
@ -1,10 +1,7 @@
|
||||||
---
|
---
|
||||||
grsf_publisher_ws_install: False
|
grsf_publisher_ws_install: False
|
||||||
grsf_publisher_ws_upgrade: False
|
grsf_publisher_ws_ver: latest
|
||||||
grsf_publisher_ws_gcube_repository: gcube-staging
|
grsf_publisher_ws_group_id: org.gcube.data-catalogue
|
||||||
grsf_publisher_ws_ver: 1.3.0-4.6.1-152504
|
|
||||||
|
|
||||||
grsf_publisher_ws_name: grsf-publisher-ws
|
grsf_publisher_ws_name: grsf-publisher-ws
|
||||||
grsf_publisher_ws_file: '{{ grsf_publisher_ws_name }}-{{ grsf_publisher_ws_ver }}.war'
|
grsf_publisher_ws_extension: war
|
||||||
|
grsf_publisher_ws_file: '{{ grsf_publisher_ws_name }}-{{ grsf_publisher_ws_ver }}.{{ grsf_publisher_ws_extension }}'
|
||||||
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 }}'
|
|
||||||
|
|
|
@ -1,14 +1,29 @@
|
||||||
---
|
---
|
||||||
- block:
|
- block:
|
||||||
- name: Remove the old grsf-publisher-ws files
|
- name: Remove the old grsf-publisher-ws files
|
||||||
file: path={{ smartgears_instance_path }}/webapps/{{ grsf_publisher_ws_name }} state=absent
|
file: path={{ item }} state=absent
|
||||||
when: grsf_publisher_ws_upgrade
|
with_items:
|
||||||
|
- '{{ smartgears_instance_path }}/webapps/{{ grsf_publisher_ws_name }}'
|
||||||
|
- '{{ smartgears_instance_path }}/webapps/{{ grsf_publisher_ws_name }}.{{ grsf_publisher_ws_extension }}'
|
||||||
|
notify: Restart smartgears
|
||||||
|
|
||||||
- name: Create the grsf-publisher-ws working directory
|
become: True
|
||||||
file: path={{ smartgears_instance_path }}/webapps/{{ grsf_publisher_ws_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }}
|
become_user: '{{ d4science_user }}'
|
||||||
|
tags: [ 'smartgears', 'grsf_publisher_ws', 'tomcat' ]
|
||||||
|
when: not grsf_publisher_ws_install
|
||||||
|
|
||||||
|
- block:
|
||||||
|
- name: Get the grsf-publisher-ws war
|
||||||
|
maven_artifact: artifact_id={{ grsf_publisher_ws_name }} version={{ grsf_publisher_ws_version | default(omit) }} group_id={{ quota_group_id }} extension={{ quota_extension | default('war') }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_downloads_dir }}/{{ grsf_publisher_ws_file }}
|
||||||
|
register: grsf_publisher_download
|
||||||
|
|
||||||
|
- name: Remove the old grsf-publisher-ws files
|
||||||
|
file: path={{ smartgears_instance_path }}/webapps/{{ grsf_publisher_ws_name }} state=absent
|
||||||
|
notify: Restart smartgears
|
||||||
|
when: ( grsf_publisher_download | changed )
|
||||||
|
|
||||||
- name: Unarchive the grsf_publisher_ws war
|
- 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
|
copy: src={{ smartgears_downloads_dir }}/{{ grsf_publisher_ws_file }} dest={{ smartgears_instance_path }}/webapps/{{ grsf_publisher_ws_name }}. {{ grsf_publisher_ws_extension }} remote_src=yes force=yes
|
||||||
notify: Restart smartgears
|
notify: Restart smartgears
|
||||||
|
|
||||||
become: True
|
become: True
|
||||||
|
|
Loading…
Reference in New Issue