From fcda3ef2b169511ae745fdef6673d5b5cca49560 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 20 Jul 2017 15:32:14 +0200 Subject: [PATCH] library/roles/smartgears/oscar_importer_se_plugin: Role that installs the oscar importer smart executor plugin. --- .../oscar_importer_se_plugin/defaults/main.yml | 12 ++++++++++++ smartgears/oscar_importer_se_plugin/tasks/main.yml | 14 ++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 smartgears/oscar_importer_se_plugin/defaults/main.yml create mode 100644 smartgears/oscar_importer_se_plugin/tasks/main.yml diff --git a/smartgears/oscar_importer_se_plugin/defaults/main.yml b/smartgears/oscar_importer_se_plugin/defaults/main.yml new file mode 100644 index 00000000..7a922dbd --- /dev/null +++ b/smartgears/oscar_importer_se_plugin/defaults/main.yml @@ -0,0 +1,12 @@ +--- +oscar_importer_se_plugin_install: False +oscar_importer_se_plugin_upgrade: False +oscar_importer_se_plugin_version: latest + +oscar_importer_se_plugin_group_id: 'org.gcube.dataanalysis' +oscar_importer_se_plugin_name: 'oscar-importer-se-plugin' +oscar_importer_se_plugin_extension: 'jar' +oscar_importer_se_plugin_classifier: 'jar-with-dependencies' +oscar_importer_se_plugin_file: '{{ oscar_importer_se_plugin_name }}-{{ oscar_importer_se_plugin_version }}-jar-with-dependencies.{{ oscar_importer_se_plugin_extension }}' + +# Note: the deb package libnetcdfc7 is required diff --git a/smartgears/oscar_importer_se_plugin/tasks/main.yml b/smartgears/oscar_importer_se_plugin/tasks/main.yml new file mode 100644 index 00000000..9e53bc21 --- /dev/null +++ b/smartgears/oscar_importer_se_plugin/tasks/main.yml @@ -0,0 +1,14 @@ +--- +- block: + - name: Remove the old oscar-importer plugin + shell: rm -f {{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/oscar-importer-se-plugin-*-jar-with-dependencies.jar + when: oscar_importer_se_plugin_upgrade + + - name: Install the oscar-importer plugin inside the smart executor lib directory + maven_artifact: artifact_id={{ oscar_importer_se_plugin_name }} version={{ oscar_importer_se_plugin_version | default(omit) }} group_id={{ oscar_importer_se_plugin_group_id }} extension={{ oscar_importer_se_plugin_extension | default('war') }} repository_url={{ smartgears_global_base_url }} classifier={{ oscar_importer_se_plugin_classifier }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ oscar_importer_se_plugin_file }} + notify: Restart smartgears + + become: True + become_user: '{{ smartgears_user }}' + when: oscar_importer_se_plugin_install + tags: [ 'smartgears', 'oscar_importer_se', 'tomcat' ]