This commit is contained in:
Andrea Dell'Amico 2018-10-16 17:45:36 +02:00
parent 6d92f1a157
commit e8ea58a517
2 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,7 @@
---
gcube_geonetwork_connector_install: False
gcube_geonetwork_connector_ver: latest
gcube_geonetwork_connector_name: gcube-geonetwork-connector
gcube_geonetwork_connector_group_id: org.gcube.data.access.geonetwork
gcube_geonetwork_connector_extension: jar
gcube_geonetwork_connector_file: '{{ gcube_geonetwork_connector_name }}-{{ gcube_geonetwork_connector_ver }}.{{ gcube_geonetwork_connector_extension }}'

View File

@ -0,0 +1,29 @@
---
- block:
- name: Remove the installed gcube geonetwork connector if we want to remove the service
shell: rm -f {{ smartgears_instance_path }}/webapps/{{ geonetwork_app_name | lower }}/WEB-INF/lib/{{ gcube_geonetwork_connector_name }}*.jar
notify: Restart smartgears
become: True
become_user: '{{ smartgears_user }}'
when: not gcube_geonetwork_connector_install
tags: [ 'smartgears', 'geonetwork', 'gcube_geonetwork_connector', 'tomcat' ]
- block:
- name: Get the gcube geonetwork connector
maven_artifact: artifact_id={{ gcube_geonetwork_connector_name }} version={{ gcube_geonetwork_connector_version | default(omit) }} group_id={{ gcube_geonetwork_connector_group_id }} extension={{ gcube_geonetwork_connector_extension | default('war') }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_downloads_dir }}/{{ gcube_geonetwork_connector_file }} verify_checksum=always
register: gcube_conn_download
- name: Remove the installed gcube geonetwork connector before upgrading
shell: rm -f {{ smartgears_instance_path }}/webapps/{{ geonetwork_app_name | lower }}/WEB-INF/lib/{{ gcube_geonetwork_connector_name }}*.jar
when: gcube_conn_download is changed
notify: Restart smartgears
- name: Copy the gcube geonetwork connector to its destination
copy: src={{ smartgears_downloads_dir }}/{{ gcube_geonetwork_connector_file }} dest={{ smartgears_instance_path }}/webapps/{{ geonetwork_app_name | lower }}/WEB-INF/lib/{{ gcube_geonetwork_connector_name }}.{{ gcube_geonetwork_connector_extension }} remote_src=yes force=yes
notify: Restart smartgears
become: True
become_user: '{{ smartgears_user }}'
when: gcube_geonetwork_connector_install
tags: [ 'smartgears', 'geonetwork', 'gcube_geonetwork_connector', 'tomcat' ]