diff --git a/smartgears/accounting_aggregator_se_plugin/defaults/main.yml b/smartgears/accounting_aggregator_se_plugin/defaults/main.yml index 4d9f2fc9..ea91995c 100644 --- a/smartgears/accounting_aggregator_se_plugin/defaults/main.yml +++ b/smartgears/accounting_aggregator_se_plugin/defaults/main.yml @@ -1,32 +1,11 @@ --- accounting_aggregator_se_plugin_install: False -accounting_aggregator_se_plugin_ver: 1.1.0-4.5.0-148744 -accounting_aggregator_se_plugin_name: 'accounting-aggregator-se-plugin-{{ accounting_aggregator_se_plugin_ver }}-jar-with-dependencies.jar' -accounting_aggregator_se_plugin_url: 'http://maven.research-infrastructures.eu/nexus/content/repositories/{{ gcube_repository }}/org/gcube/accounting/accounting-aggregator-se-plugin/{{ accounting_aggregator_se_plugin_ver }}/{{ accounting_aggregator_se_plugin_name }}' +accounting_aggregator_se_plugin_name: 'accounting-aggregator-se-plugin' -accounting_aggregator_se_plugin_maven_group_id : 'org.gcube.accounting' -accounting_aggregator_se_plugin_maven_artifact_id : 'accounting-aggregator-se-plugin' -accounting_aggregator_se_plugin_maven_version : '1.0.0-SNAPSHOT' +accounting_aggregator_se_plugin_group_id : 'org.gcube.accounting' +accounting_aggregator_se_plugin_artifact_id : 'accounting-aggregator-se-plugin' +accounting_aggregator_se_plugin_version : '1.0.0-SNAPSHOT' +accounting_aggregator_se_plugin_extension: 'jar' +accounting_aggregator_se_plugin_classifier: 'jar-with-dependencies' +accounting_aggregator_se_plugin_file: '{{ accounting_aggregator_se_plugin_name }}-{{ accounting_aggregator_se_plugin_version }}-jar-with-dependencies.{{ accounting_aggregator_se_plugin_extension }}' - -accounting_insert_storage_se_plugin_install: False -accounting_insert_storage_se_plugin_ver: 1.0.1-4.5.0-148393 -accounting_insert_storage_se_plugin_name: '{{ accounting_insert_storage_se_plugin_maven_artifact_id }}-{{ accounting_insert_storage_se_plugin_ver }}-jar-with-dependencies.jar' -accounting_insert_storage_se_plugin_url: 'http://maven.research-infrastructures.eu/nexus/content/repositories/{{ gcube_repository }}/org/gcube/accounting/{{ accounting_insert_storage_se_plugin_maven_artifact_id }}/{{ accounting_insert_storage_se_plugin_ver }}/{{ accounting_insert_storage_se_plugin_name }}' - -accounting_insert_storage_se_plugin_maven_group_id : 'org.gcube.accounting' -accounting_insert_storage_se_plugin_maven_artifact_id : 'accounting-insert-storage-se-plugin' -accounting_insert_storage_se_plugin_maven_version : '1.0.0-4.4.0-142716' - - - -# To be moved in RStudio playbook - -# accounting_insert_rstudio_se_plugin_install: False -# accounting_insert_rstudio_se_plugin_ver: 1.0.0-4.5.0-148358 -# accounting_insert_rstudio_se_plugin_name: '{{ accounting_insert_rstudio_se_plugin_maven_artifact_id }}-{{ accounting_insert_rstudio_se_plugin_ver }}-jar-with-dependencies.jar' -# accounting_insert_rstudio_se_plugin_url: 'http://maven.research-infrastructures.eu/nexus/content/repositories/{{ gcube_repository }}/org/gcube/accounting/{{ accounting_insert_rstudio_se_plugin_maven_artifact_id }}/{{ accounting_insert_rstudio_se_plugin_ver }}/{{ accounting_insert_rstudio_se_plugin_name }}' - -# accounting_insert_rstudio_se_plugin_maven_group_id : 'org.gcube.accounting' -# accounting_insert_rstudio_se_plugin_maven_artifact_id : 'accounting-insert-rstudio-se-plugin' -# accounting_insert_rstudio_se_plugin_maven_version : '1.0.0-4.4.0-142716' diff --git a/smartgears/accounting_aggregator_se_plugin/tasks/main.yml b/smartgears/accounting_aggregator_se_plugin/tasks/main.yml index 7fa432b6..87b113d3 100644 --- a/smartgears/accounting_aggregator_se_plugin/tasks/main.yml +++ b/smartgears/accounting_aggregator_se_plugin/tasks/main.yml @@ -1,43 +1,17 @@ --- -- name: Remove the old accounting aggregator plugin - shell: rm -f {{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/accounting-aggregator-se-plugin-*-jar-with-dependencies.jar - when: accounting_aggregator_se_plugin_upgrade - tags: [ 'smartgears', 'accounting_aggregator_se', 'tomcat' ] +- block: + - name: Remove the old accounting aggregator plugin + shell: rm -f {{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/accounting-aggregator-se-plugin-*-jar-with-dependencies.jar + tags: [ 'smartgears', 'accounting_aggregator_se', 'tomcat' ] + - name: Get the accounting aggregator plugin and install it inside the smart executor + maven_artifact: artifact_id={{ accounting_aggregator_se_plugin_name }} version={{ accounting_aggregator_se_plugin_version | default(omit) }} group_id={{ accounting_aggregator_se_plugin_group_id }} extension={{ accounting_aggregator_se_plugin_extension | default('war') }} repository_url={{ smartgears_global_base_url }} classifier={{ accounting_aggregator_se_plugin_classifier }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ accounting_aggregator_se_plugin_file }} -- 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_se_plugin_upgrade - tags: [ 'smartgears', 'accounting_insert_storage_se', 'tomcat' ] + get_url: url={{ accounting_aggregator_se_plugin_url }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib + notify: Restart smartgears - -- name: Remove the old accounting rstudio storage plugin - shell: rm -f {{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ accounting_insert_rstudio_se_plugin_maven_artifact_id }}-*-jar-with-dependencies.jar - when: accounting_insert_rstudio_se_plugin_upgrade - tags: [ 'smartgears', 'accounting_insert_rstudio_se', 'tomcat' ] - - -- name: Get the accounting aggregator plugin and install it inside the smart executor become: True become_user: '{{ smartgears_user }}' - get_url: url={{ accounting_aggregator_se_plugin_url }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib when: accounting_aggregator_se_plugin_install - notify: Restart smartgears tags: [ 'smartgears', 'accounting_aggregator_se', 'tomcat' ] - -- name: Get the accounting insert storage plugin and install it inside the smart executor - become: True - become_user: '{{ smartgears_user }}' - get_url: url={{ accounting_insert_storage_se_plugin_url }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib - when: accounting_insert_storage_se_plugin_install - notify: Restart smartgears - tags: [ 'smartgears', 'accounting_insert_storage_se', 'tomcat' ] - -- name: Get the accounting insert rstudio plugin and install it inside the smart executor - become: True - become_user: '{{ smartgears_user }}' - get_url: url={{ accounting_insert_rstudio_se_plugin_url }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib - when: accounting_insert_rstudio_se_plugin_install - notify: Restart smartgears - tags: [ 'smartgears', 'accounting_insert_rstudio_se', 'tomcat' ]