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 0000000..bb6f383 --- /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 0000000..4282354 --- /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' ]