From 7468678ae7a8b8294ae4987cd2fdf1bc3c0edaf4 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Mon, 3 Jul 2017 12:44:45 +0200 Subject: [PATCH] d4science-ghn-cluster, library/roles/smartgears/meteodataimporter_se_plugin: Add the meteo data importer smartexecutor plugin. --- .../defaults/main.yml | 5 +++++ .../meteodataimporter_se_plugin/tasks/main.yml | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 smartgears/meteodataimporter_se_plugin/defaults/main.yml create mode 100644 smartgears/meteodataimporter_se_plugin/tasks/main.yml diff --git a/smartgears/meteodataimporter_se_plugin/defaults/main.yml b/smartgears/meteodataimporter_se_plugin/defaults/main.yml new file mode 100644 index 0000000..f9a02a9 --- /dev/null +++ b/smartgears/meteodataimporter_se_plugin/defaults/main.yml @@ -0,0 +1,5 @@ +--- +meteodataimporter_se_plugin_install: False +meteodataimporter_se_plugin_upgrade: False +meteodataimporter_se_plugin_name: meteo-data-importer-with-dependencies.jar +meteodataimporter_se_plugin_url: 'http://data.d4science.org/M1dPTld0M3Nnc0pwVE0rTTJGclVMQWpyM2YwcEY0UVdHbWJQNStIS0N6Yz0' diff --git a/smartgears/meteodataimporter_se_plugin/tasks/main.yml b/smartgears/meteodataimporter_se_plugin/tasks/main.yml new file mode 100644 index 0000000..b27099a --- /dev/null +++ b/smartgears/meteodataimporter_se_plugin/tasks/main.yml @@ -0,0 +1,18 @@ +--- +- block: + - name: Remove the old meteodataimporter + shell: rm -f {{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ item }} + with_items: + - '{{ meteodataimporter_se_plugin_name }}' + when: meteodataimporter_se_plugin_upgrade + + - name: Get the meteodataimporter smart executor plugin + get_url: url={{ meteodataimporter_se_plugin_url }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ meteodataimporter_se_plugin_name }} + when: meteodataimporter_se_plugin_install + notify: Restart smartgears + tags: [ 'smartgears', 'meteodataimporter_se', 'tomcat' ] + + become: True + become_user: '{{ smartgears_user }}' + when: meteodataimporter_se_plugin_install + tags: [ 'smartgears', 'meteodataimporter_se', 'tomcat' ]