ansible-roles/smartgears/sis_geotk_dt_plugin/tasks/main.yml

44 lines
2.6 KiB
YAML
Raw Normal View History

---
- block:
- name: Remove the old Sis geotk data transfer plugin
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 uber plugin
maven_artifact: artifact_id={{ sis_geotk_dt_plugin_name }} version={{ sis_geotk_dt_plugin_version }} group_id={{ sis_geotk_dt_plugin_group_id }} extension={{ sis_geotk_dt_plugin_extension }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_downloads_dir }}/{{ sis_geotk_dt_plugin_file }}
register: sis_geotk_download
- name: Remove the old Sis geotk data transfer plugin
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: 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: Unarchive the Sis geotk data transfer uber plugin to expose its libraries
unarchive: src={{ smartgears_downloads_dir }}/{{ sis_geotk_dt_plugin_uber_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)
notify: Restart smartgears
- name: Get the Sis geotk data transfer uber plugin
maven_artifact: artifact_id={{ sis_geotk_dt_plugin_name }} version={{ sis_geotk_dt_plugin_version }} group_id={{ sis_geotk_dt_plugin_group_id }} extension={{ sis_geotk_dt_plugin_extension }} repository_url={{ smartgears_global_base_url }} classifier={{ sis_geotk_dt_plugin_classifier }} dest={{ smartgears_instance_path }}/webapps/{{ data_trasfer_service_name }}/WEB-INF/lib/plugins/{{ sis_geotk_dt_plugin_name }} keep_name=yes
when: (sis_geotk_download | changed)
- name: Remove the Sis geotk uber jar org and META-INF directories
file: dest={{ smartgears_instance_path }}/webapps/{{ data_trasfer_service_name }}/WEB-INF/lib/plugins/{{ sis_geotk_dt_plugin_name }}/{{ item }} state=absent
with_items:
- org
- 'META-INF'
notify: Restart smartgears
become: True
become_user: '{{ smartgears_user }}'
when: sis_geotk_dt_plugin_install
tags: [ 'smartgears', 'sis_geotk', 'tomcat' ]