diff --git a/smartgears/meteodataimporter_se_plugin/defaults/main.yml b/smartgears/meteodataimporter_se_plugin/defaults/main.yml new file mode 100644 index 00000000..f9a02a95 --- /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 00000000..b27099a9 --- /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' ]