forked from ISTI-ansible-roles/ansible-roles
Convert the generic worker to maven_artifact.
This commit is contained in:
parent
585e811051
commit
137af07a90
|
@ -1,7 +1,12 @@
|
||||||
---
|
---
|
||||||
generic_worker_install: False
|
generic_worker_install: False
|
||||||
|
|
||||||
smart_generic_worker_plugin_ver: 1.0.3-4.0.0-128830
|
smart_generic_worker_plugin_name: 'smart-generic-worker'
|
||||||
smart_generic_worker_plugin_name: 'smart-generic-worker-{{ smart_generic_worker_plugin_ver }}-jar-with-dependencies.jar'
|
|
||||||
smart_generic_worker_plugin_url: 'http://maven.research-infrastructures.eu/nexus/content/repositories/{{ gcube_repository }}/org/gcube/dataanalysis/smart-generic-worker/{{ smart_generic_worker_plugin_ver }}/{{ smart_generic_worker_plugin_name }}'
|
smart_generic_worker_plugin_group_id : 'org.gcube.dataanalysis'
|
||||||
|
smart_generic_worker_plugin_artifact_id : '{{ smart_generic_worker_plugin_name }}'
|
||||||
|
smart_generic_worker_plugin_version : latest
|
||||||
|
smart_generic_worker_plugin_extension: jar
|
||||||
|
smart_generic_worker_plugin_classifier: jar-with-dependencies
|
||||||
|
smart_generic_worker_plugin_file: '{{ smart_generic_worker_plugin_name }}-{{ smart_generic_worker_plugin_version }}-jar-with-dependencies.{{ smart_generic_worker_plugin_extension }}'
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,30 @@
|
||||||
---
|
---
|
||||||
- name: Get the smart generic worker plugin and install it inside the smart executor
|
- block:
|
||||||
|
- name: Remove the smart generic worker plugin
|
||||||
|
shell: rm -f {{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ smart_generic_worker_plugin_name }}-*-jar-with-dependencies.jar
|
||||||
|
notify: Restart smartgears
|
||||||
|
|
||||||
become: True
|
become: True
|
||||||
become_user: '{{ smartgears_user }}'
|
become_user: '{{ smartgears_user }}'
|
||||||
get_url: url={{ smart_generic_worker_plugin_url }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib
|
when: not generic_worker_install
|
||||||
when: generic_worker_install
|
|
||||||
notify: Restart smartgears
|
|
||||||
tags: [ 'smartgears', 'generic_worker', 'tomcat' ]
|
tags: [ 'smartgears', 'generic_worker', 'tomcat' ]
|
||||||
|
|
||||||
|
- block:
|
||||||
|
- name: Get the smart generic worker plugin and install it inside the smart executor
|
||||||
|
maven_artifact: artifact_id={{ smart_generic_worker_plugin_name }} version={{ smart_generic_worker_plugin_version | default('latest') }} group_id={{ smart_generic_worker_plugin_group_id }} extension={{ smart_generic_worker_plugin_extension | default('war') }} repository_url={{ smartgears_global_base_url }} classifier={{ smart_generic_worker_plugin_classifier }} dest={{ smartgears_downloads_dir }}/{{ smart_generic_worker_plugin_file }}
|
||||||
|
register: smart_executor_download
|
||||||
|
|
||||||
|
- name: Remove the old accounting aggregator plugin
|
||||||
|
shell: rm -f {{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ smart_generic_worker_plugin_name }}-*-jar-with-dependencies.jar
|
||||||
|
when: (smart_executor_download | changed)
|
||||||
|
|
||||||
|
- name: Copy the accounting aggregator plugin to its final destination
|
||||||
|
copy: src={{ smartgears_downloads_dir }}/{{ smart_generic_worker_plugin_file }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ smart_generic_worker_plugin_file }} remote_src=yes force=yes
|
||||||
|
notify: Restart smartgears
|
||||||
|
|
||||||
|
become: True
|
||||||
|
become_user: '{{ smartgears_user }}'
|
||||||
|
when: generic_worker_install
|
||||||
|
tags: [ 'smartgears', 'generic_worker', 'tomcat' ]
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue