Convert social_data_indexer_se_plugin to maven_artifact.

This commit is contained in:
Andrea Dell'Amico 2017-10-11 18:02:20 +02:00
parent aa1dbe8f21
commit 9b0e808212
2 changed files with 30 additions and 16 deletions

View File

@ -1,9 +1,9 @@
--- ---
social_data_indexer_se_plugin_install: False social_data_indexer_se_plugin_install: False
social_data_indexer_se_plugin_ver: 1.2.1-4.5.0-148682 social_data_indexer_se_plugin_version: latest
social_data_indexer_se_plugin_name: 'social-data-indexer-se-plugin-{{ social_data_indexer_se_plugin_ver }}-jar-with-dependencies.jar' social_data_indexer_se_plugin_group_id: org.gcube.socialnetworking
social_data_indexer_se_plugin_url: 'http://maven.research-infrastructures.eu/nexus/content/repositories/{{ gcube_repository }}/org/gcube/socialnetworking/social-data-indexer-se-plugin/{{ social_data_indexer_se_plugin_ver }}/{{ social_data_indexer_se_plugin_name }}' social_data_indexer_se_plugin_name: 'social-data-indexer-se-plugin'
social_data_indexer_se_plugin_artifact_id: '{{ social_data_indexer_se_plugin_name }}'
social_data_indexer_se_plugin_maven_group_id : 'org.gcube.socialnetworking' social_data_indexer_se_plugin_extension: jar
social_data_indexer_se_plugin_maven_artifact_id : 'social-data-indexer-se-plugin' social_data_indexer_se_plugin_classifier: jar-with-dependencies
social_data_indexer_se_plugin_maven_version : '1.2.1-4.5.0-148682' social_data_indexer_se_plugin_file: '{{ social_data_indexer_se_plugin_name }}-{{ social_data_indexer_se_plugin_ver }}-jar-with-dependencies.{{ social_data_indexer_se_plugin_extension }}'

View File

@ -1,15 +1,29 @@
--- ---
- name: Remove the old social indexer plugin - block:
shell: rm -f {{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/social-data-indexer-se-plugin-*-jar-with-dependencies.jar - name: Remove the old social indexer plugin
when: social_data_indexer_se_plugin_upgrade shell: rm -f {{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ social_data_indexer_se_plugin_name }}-*-jar-with-dependencies.jar
tags: [ 'smartgears', 'social_data_indexer_se', 'tomcat' ] notify: Restart smartgears
- name: Get the social indexer plugin and install it inside the smart executor
become: True become: True
become_user: '{{ smartgears_user }}' become_user: '{{ smartgears_user }}'
get_url: url={{ social_data_indexer_se_plugin_url }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib when: not social_data_indexer_se_plugin_install
when: social_data_indexer_se_plugin_install tags: [ 'smartgears', 'social_data_indexer_se', 'tomcat' ]
notify: Restart smartgears
- block:
- name: Get the social indexer plugin and install it inside the smart executor
maven_artifact: artifact_id={{ social_data_indexer_se_plugin_name }} version={{ social_data_indexer_se_plugin_version | default('latest') }} group_id={{ social_data_indexer_se_plugin_group_id }} extension={{ social_data_indexer_se_plugin_extension | default('war') }} repository_url={{ smartgears_global_base_url }} classifier={{ social_data_indexer_se_plugin_classifier }} dest={{ smartgears_downloads_dir }}/{{ social_data_indexer_se_plugin_file }}
register: social_indexer_download
- name: Remove the old social indexer plugin
shell: rm -f {{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ social_data_indexer_se_plugin_name }}-*-jar-with-dependencies.jar
when: (social_indexer_download | changed)
- name: Copy the accounting aggregator plugin to its final destination
copy: src={{ smartgears_downloads_dir }}/{{ social_data_indexer_se_plugin_file }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ social_data_indexer_se_plugin_file }} remote_src=yes force=yes
notify: Restart smartgears
become: True
become_user: '{{ smartgears_user }}'
when: social_data_indexer_se_plugin_install
tags: [ 'smartgears', 'social_data_indexer_se', 'tomcat' ] tags: [ 'smartgears', 'social_data_indexer_se', 'tomcat' ]