forked from ISTI-ansible-roles/ansible-roles
sis_geotk_dt_plugin: Manage the uber jar as an additional app plugin. See https://support.d4science.org/issues/10202
This commit is contained in:
parent
e68e5a6fee
commit
1cddd28d37
|
@ -9,3 +9,5 @@ sis_geotk_dt_plugin_extension: jar
|
|||
sis_geotk_dt_plugin_classifier: jar-with-dependencies
|
||||
sis_geotk_dt_plugin_file: '{{ sis_geotk_dt_plugin_name }}-{{ sis_geotk_dt_plugin_version }}-jar-with-dependencies.{{ sis_geotk_dt_plugin_extension }}'
|
||||
|
||||
catalina_apps_conf:
|
||||
- { app_name: '{{ data_trasfer_service_name }}', plugin_name: '{{ sis_geotk_dt_plugin_name }}' }
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
dependencies:
|
||||
- role: '../library/roles/smartgears/catalina-app-conf'
|
||||
|
|
@ -1,26 +1,33 @@
|
|||
---
|
||||
- block:
|
||||
- name: Remove the old Sis geotk data transfer plugin
|
||||
shell: rm -f {{ smartgears_instance_path }}/webapps/{{ data_trasfer_service_name }}/WEB-INF/lib/{{ sis_geotk_dt_plugin_name }}-*-jar-with-dependencies.jar
|
||||
|
||||
file: dest={{ smartgears_instance_path }}/webapps/{{ data_trasfer_service_name }}/WEB-INF/lib/plugins/{{ sis_geotk_dt_plugin_name }} state=absent
|
||||
|
||||
become: True
|
||||
become_user: '{{ smartgears_user }}'
|
||||
when: not sis_geotk_dt_plugin_install
|
||||
tags: [ 'smartgears', 'sis_geotk', 'tomcat' ]
|
||||
|
||||
- block:
|
||||
- name: Get the Sis geotk data transfer plugin and install it inside the smart executor
|
||||
- name: Create the plugin directory inside data transfer
|
||||
file: dest={{ smartgears_instance_path }}/webapps/{{ data_trasfer_service_name }}/WEB-INF/lib/plugins/{{ sis_geotk_dt_plugin_name }} state=directory
|
||||
|
||||
- name: Get the Sis geotk data transfer plugin
|
||||
maven_artifact: artifact_id={{ sis_geotk_dt_plugin_name }} version={{ sis_geotk_dt_plugin_version | default(omit) }} group_id={{ sis_geotk_dt_plugin_group_id }} extension={{ sis_geotk_dt_plugin_extension | default('war') }} repository_url={{ smartgears_global_base_url }} classifier={{ sis_geotk_dt_plugin_classifier }} dest={{ smartgears_downloads_dir }}/{{ sis_geotk_dt_plugin_file }}
|
||||
register: sis_geotk_download
|
||||
|
||||
- name: Remove the old Sis geotk data transfer plugin
|
||||
shell: rm -f {{ smartgears_instance_path }}/webapps/{{ data_trasfer_service_name }}/WEB-INF/lib/{{ sis_geotk_dt_plugin_name }}-*-jar-with-dependencies.jar
|
||||
file: dest={{ smartgears_instance_path }}/webapps/{{ data_trasfer_service_name }}/WEB-INF/lib/plugins/{{ sis_geotk_dt_plugin_name }} state=absent
|
||||
when: (sis_geotk_download | changed)
|
||||
|
||||
- name: Copy the Sis geotk data transfer plugin to its final destination
|
||||
copy: src={{ smartgears_downloads_dir }}/{{ sis_geotk_dt_plugin_file }} dest={{ smartgears_instance_path }}/webapps/{{ data_trasfer_service_name }}/WEB-INF/lib/{{ sis_geotk_dt_plugin_file }} remote_src=yes force=yes
|
||||
copy: src={{ smartgears_downloads_dir }}/{{ sis_geotk_dt_plugin_file }} dest={{ smartgears_instance_path }}/webapps/{{ data_trasfer_service_name }}/WEB-INF/lib/plugins/{{ sis_geotk_dt_plugin_name }}/{{ sis_geotk_dt_plugin_file }} remote_src=yes
|
||||
notify: Restart smartgears
|
||||
|
||||
- name: Unarchive the Sis geotk data transfer plugin to expose its libraries
|
||||
unarchive: src={{ smartgears_downloads_dir }}/{{ sis_geotk_dt_plugin_file }} dest={{ smartgears_instance_path }}/webapps/{{ data_trasfer_service_name }}/WEB-INF/lib/plugins/{{ sis_geotk_dt_plugin_name }}/ copy=no
|
||||
when: (sis_geotk_download | changed)
|
||||
|
||||
become: True
|
||||
become_user: '{{ smartgears_user }}'
|
||||
when: sis_geotk_dt_plugin_install
|
||||
|
|
Loading…
Reference in New Issue