From a4b26717eec0a00e8445c152cc2de68e42627251 Mon Sep 17 00:00:00 2001 From: Roberto Date: Fri, 17 Nov 2017 17:27:28 +0100 Subject: [PATCH] inventory/hosts.production add quota plugin host smartgears-node-upgrade.yml, smartgears-node.yml add new role for quota plugin --- .../defaults/main.yml | 11 ------- .../tasks/main.yml | 29 ------------------- smartgears/quota_se_plugin/defaults/main.yml | 11 +++++++ smartgears/quota_se_plugin/tasks/main.yml | 29 +++++++++++++++++++ 4 files changed, 40 insertions(+), 40 deletions(-) delete mode 100644 smartgears/accounting_insert_storage_se_plugin/defaults/main.yml delete mode 100644 smartgears/accounting_insert_storage_se_plugin/tasks/main.yml create mode 100644 smartgears/quota_se_plugin/defaults/main.yml create mode 100644 smartgears/quota_se_plugin/tasks/main.yml diff --git a/smartgears/accounting_insert_storage_se_plugin/defaults/main.yml b/smartgears/accounting_insert_storage_se_plugin/defaults/main.yml deleted file mode 100644 index 464de925..00000000 --- a/smartgears/accounting_insert_storage_se_plugin/defaults/main.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -accounting_insert_storage_se_plugin_install: False -accounting_insert_storage_se_plugin_upgrade: False - -accounting_insert_storage_se_plugin_name: accounting-insert-storage-se-plugin -accounting_insert_storage_se_plugin_group_id: org.gcube.accounting -accounting_insert_storage_se_plugin_version : 1.0.1-4.5.0-148393 -accounting_insert_storage_se_plugin_artifact_id: accounting-insert-storage-se-plugin -accounting_insert_storage_se_plugin_extension: jar -accounting_insert_storage_se_plugin_classifier: jar-with-dependencies -accounting_insert_storage_se_plugin_file: '{{ accounting_insert_storage_se_plugin_name }}-{{ accounting_insert_storage_se_plugin_version }}-{{ accounting_insert_storage_se_plugin_classifier }}.{{ accounting_insert_storage_se_plugin_extension }}' diff --git a/smartgears/accounting_insert_storage_se_plugin/tasks/main.yml b/smartgears/accounting_insert_storage_se_plugin/tasks/main.yml deleted file mode 100644 index c9d6da19..00000000 --- a/smartgears/accounting_insert_storage_se_plugin/tasks/main.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -- block: - - name: Remove the old accounting insert storage plugin - shell: rm -f {{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ accounting_insert_storage_se_plugin_maven_artifact_id }}-*-jar-with-dependencies.jar - notify: Restart smartgears - - become: True - become_user: '{{ smartgears_user }}' - when: not accounting_insert_storage_se_plugin_install - tags: [ 'smartgears', 'accounting_insert_storage_se', 'tomcat' ] - -- block: - - name: Get the accounting insert storage plugin and install it inside the smart executor - maven_artifact: artifact_id={{ accounting_insert_storage_se_plugin_name }} version={{ accounting_insert_storage_se_plugin_version | default(omit) }} group_id={{ accounting_insert_storage_se_plugin_group_id }} extension={{ accounting_insert_storage_se_plugin_extension | default('war') }} repository_url={{ smartgears_global_base_url }} classifier={{ accounting_insert_storage_se_plugin_classifier }} dest={{ smartgears_downloads_dir }}/{{ accounting_insert_storage_se_plugin_file }} - register: accounting_insert_storage_download - - - name: Remove the old accounting insert storage plugin - shell: rm -f {{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ accounting_insert_storage_se_plugin_maven_artifact_id }}-*-jar-with-dependencies.jar - when: (accounting_insert_storage_download | changed) - - - name: Copy the accounting aggregator plugin to its final destination - copy: src={{ smartgears_downloads_dir }}/{{ accounting_insert_storage_se_plugin_file }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ accounting_insert_storage_se_plugin_file }} remote_src=yes - notify: Restart smartgears - - become: True - become_user: '{{ smartgears_user }}' - when: accounting_insert_storage_se_plugin_install - tags: [ 'smartgears', 'accounting_insert_storage_se', 'tomcat' ] - diff --git a/smartgears/quota_se_plugin/defaults/main.yml b/smartgears/quota_se_plugin/defaults/main.yml new file mode 100644 index 00000000..60e92c21 --- /dev/null +++ b/smartgears/quota_se_plugin/defaults/main.yml @@ -0,0 +1,11 @@ +--- +quota_se_plugin_install: False +quota_se_plugin_upgrade: False + +quota_se_plugin_name: accounting-insert-storage-se-plugin +quota_se_plugin_group_id: org.gcube.accounting +quota_se_plugin_version : 1.0.1-4.5.0-148393 +quota_se_plugin_artifact_id: accounting-insert-storage-se-plugin +quota_se_plugin_extension: jar +quota_se_plugin_classifier: jar-with-dependencies +quota_se_plugin_file: '{{ quota_se_plugin_name }}-{{ quota_se_plugin_version }}-{{ quota_se_plugin_classifier }}.{{ quota_se_plugin_extension }}' diff --git a/smartgears/quota_se_plugin/tasks/main.yml b/smartgears/quota_se_plugin/tasks/main.yml new file mode 100644 index 00000000..0b806314 --- /dev/null +++ b/smartgears/quota_se_plugin/tasks/main.yml @@ -0,0 +1,29 @@ +--- +- block: + - name: Remove the old quota plugin + shell: rm -f {{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ quota_se_plugin_artifact_id }}-*-jar-with-dependencies.jar + notify: Restart smartgears + + become: True + become_user: '{{ smartgears_user }}' + when: not quota_se_plugin_install + tags: [ 'smartgears', 'quota_se', 'tomcat' ] + +- block: + - name: Get the quota plugin and install it inside the smart executor + maven_artifact: artifact_id={{ quota_se_plugin_name }} version={{ quota_se_plugin_version | default(omit) }} group_id={{ quota_se_plugin_group_id }} extension={{ quota_se_plugin_extension | default('war') }} repository_url={{ smartgears_global_base_url }} classifier={{ quota_se_plugin_classifier }} dest={{ smartgears_downloads_dir }}/{{ quota_se_plugin_file }} + register: quota_storage_download + + - name: Remove the old quota plugin + shell: rm -f {{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ quota_se_plugin_maven_artifact_id }}-*-jar-with-dependencies.jar + when: (quota_storage_download | changed) + + - name: Copy the quota plugin to its final destination + copy: src={{ smartgears_downloads_dir }}/{{ quota_se_plugin_file }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ quota_se_plugin_file }} remote_src=yes + notify: Restart smartgears + + become: True + become_user: '{{ smartgears_user }}' + when: quota_se_plugin_install + tags: [ 'smartgears', 'quota_se', 'tomcat' ] +