geoserver-connector: Fix the upgrade scenario.
This commit is contained in:
parent
4859629c1c
commit
c31725edad
|
@ -2,10 +2,25 @@
|
||||||
- block:
|
- block:
|
||||||
- name: Remove the installed gcube geoserver connector before upgrading
|
- name: Remove the installed gcube geoserver connector before upgrading
|
||||||
shell: rm -f {{ smartgears_instance_path }}/webapps/{{ geoserver_app_name | lower }}/WEB-INF/lib/{{ gcube_geoserver_connector_name }}*.jar
|
shell: rm -f {{ smartgears_instance_path }}/webapps/{{ geoserver_app_name | lower }}/WEB-INF/lib/{{ gcube_geoserver_connector_name }}*.jar
|
||||||
when: gcube_geoserver_connector_upgrade
|
notify: Restart smartgears
|
||||||
|
|
||||||
- name: Get the gcube connector and install it inside the geoserver lib directory
|
become: True
|
||||||
maven_artifact: artifact_id={{ gcube_geoserver_connector_name }} version={{ gcube_geoserver_connector_version | default(omit) }} group_id={{ gcube_geoserver_connector_group_id }} extension={{ gcube_geoserver_connector_extension | default('war') }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_instance_path }}/webapps/{{ geoserver_app_name | lower }}/WEB-INF/lib/{{ gcube_geoserver_connector_file }}
|
become_user: '{{ smartgears_user }}'
|
||||||
|
when: not gcube_geoserver_connector_install
|
||||||
|
tags: [ 'smartgears', 'ckan', 'gcube_geoserver_connector', 'tomcat' ]
|
||||||
|
|
||||||
|
- block:
|
||||||
|
- name: Get the gcube connector
|
||||||
|
maven_artifact: artifact_id={{ gcube_geoserver_connector_name }} version={{ gcube_geoserver_connector_version | default(omit) }} group_id={{ gcube_geoserver_connector_group_id }} extension={{ gcube_geoserver_connector_extension | default('war') }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_downloads_dir }}/{{ gcube_geoserver_connector_file }}
|
||||||
|
register: gcube_conn_download
|
||||||
|
|
||||||
|
- name: Remove the installed gcube geoserver connector before upgrading
|
||||||
|
shell: rm -f {{ smartgears_instance_path }}/webapps/{{ geoserver_app_name | lower }}/WEB-INF/lib/{{ gcube_geoserver_connector_name }}*.jar
|
||||||
|
when: ( gcube_conn_download | changed )
|
||||||
|
notify: Restart smartgears
|
||||||
|
|
||||||
|
- name: Copy the gcube connector to its destination
|
||||||
|
copy: src={{ smartgears_downloads_dir }}/{{ gcube_geoserver_connector_file }} dest={{ smartgears_downloads_dir }}/webapps/{{ geoserver_app_name | lower }}/WEB-INF/lib/{{ gcube_geoserver_connector_name }}.{{ gcube_geoserver_connector_extension }}
|
||||||
notify: Restart smartgears
|
notify: Restart smartgears
|
||||||
|
|
||||||
become: True
|
become: True
|
||||||
|
|
Loading…
Reference in New Issue