From 5fa669d71b5edf731ee07b1265c8e44b24b9154b Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 20 Apr 2017 17:23:58 +0200 Subject: [PATCH] library/roles/smartgears/resource_checker_se_plugin: Add a role for the resource checker se plugin. --- .../resource_checker_se_plugin/defaults/main.yml | 10 ++++++++++ .../resource_checker_se_plugin/tasks/main.yml | 14 ++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 smartgears/resource_checker_se_plugin/defaults/main.yml create mode 100644 smartgears/resource_checker_se_plugin/tasks/main.yml diff --git a/smartgears/resource_checker_se_plugin/defaults/main.yml b/smartgears/resource_checker_se_plugin/defaults/main.yml new file mode 100644 index 00000000..bb6f3836 --- /dev/null +++ b/smartgears/resource_checker_se_plugin/defaults/main.yml @@ -0,0 +1,10 @@ +--- +resource_checker_se_plugin_install: False +resource_checker_se_plugin_upgrade: False +resource_checker_se_plugin_version: 1.0.0-4.4.0-146988 +# resource_checker_se_plugin_version: 1.0.0-SNAPSHOT +resource_checker_se_plugin_group_id: 'org.gcube.information-system' +resource_checker_se_plugin_name: 'resource-checker-se-plugin' +resource_checker_se_plugin_extension: 'jar' +resource_checker_se_plugin_classifier: 'jar-with-dependencies' +resource_checker_se_plugin_file: '{{ resource_checker_se_plugin_name }}-{{ resource_checker_se_plugin_version }}-jar-with-dependencies.{{ resource_checker_se_plugin_extension }}' diff --git a/smartgears/resource_checker_se_plugin/tasks/main.yml b/smartgears/resource_checker_se_plugin/tasks/main.yml new file mode 100644 index 00000000..4282354b --- /dev/null +++ b/smartgears/resource_checker_se_plugin/tasks/main.yml @@ -0,0 +1,14 @@ +--- +- block: + - name: Remove the old resource checker plugin + shell: rm -f {{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/resource-checker-se-plugin-*-jar-with-dependencies.jar + when: resource_checker_se_plugin_upgrade + + - name: Install the resource checker plugin inside the smart executor lib directory + maven_artifact: artifact_id={{ resource_checker_se_plugin_name }} version={{ resource_checker_se_plugin_version | default(omit) }} group_id={{ resource_checker_se_plugin_group_id }} extension={{ resource_checker_se_plugin_extension | default('war') }} repository_url={{ smartgears_global_base_url }} classifier={{ resource_checker_se_plugin_classifier }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ resource_checker_se_plugin_file }} + notify: Restart smartgears + + become: True + become_user: '{{ smartgears_user }}' + when: resource_checker_se_plugin_install + tags: [ 'smartgears', 'resource_checker_se', 'tomcat' ]