From 83c13df9cc3704538674707b65ede9f143f68165 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Mon, 3 Jul 2017 19:38:52 +0200 Subject: [PATCH] library/roles/smartgears/geoserver_connector: Geoserver smartgears connector. --- smartgears/geoserver_connector/defaults/main.yml | 8 ++++++++ smartgears/geoserver_connector/tasks/main.yml | 14 ++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 smartgears/geoserver_connector/defaults/main.yml create mode 100644 smartgears/geoserver_connector/tasks/main.yml diff --git a/smartgears/geoserver_connector/defaults/main.yml b/smartgears/geoserver_connector/defaults/main.yml new file mode 100644 index 00000000..d40134d5 --- /dev/null +++ b/smartgears/geoserver_connector/defaults/main.yml @@ -0,0 +1,8 @@ +--- +gcube_geoserver_connector_install: False +gcube_geoserver_connector_upgrade: False +gcube_geoserver_connector_ver: latest +gcube_geoserver_connector_name: gcube-geoserver-connector +gcube_geoserver_connector_group_id: org.gcube.data.access.geoserver +gcube_geoserver_connector_extension: jar +gcube_geoserver_connector_file: '{{ gcube_geoserver_connector_name }}-{{ gcube_geoserver_connector_ver }}.{{ gcube_geoserver_connector_extension }}' diff --git a/smartgears/geoserver_connector/tasks/main.yml b/smartgears/geoserver_connector/tasks/main.yml new file mode 100644 index 00000000..7181fe56 --- /dev/null +++ b/smartgears/geoserver_connector/tasks/main.yml @@ -0,0 +1,14 @@ +--- +- block: + - 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_geoserver_connector_upgrade + + - name: Get the gcube connector and install it inside the geoserver lib directory + 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 }} + notify: Restart smartgears + + become: True + become_user: '{{ smartgears_user }}' + when: gcube_geoserver_connector_install + tags: [ 'smartgears', 'ckan', 'gcube_geoserver_connector', 'tomcat' ]