smart executor: use the 'downloads' directory, fix the upgrade scenario. See https://support.d4science.org/issues/9688
This commit is contained in:
parent
c99a710e52
commit
2c733203fd
|
@ -1,22 +1,29 @@
|
||||||
---
|
---
|
||||||
- block:
|
- block:
|
||||||
- name: Remove the old smart executor files if an upgrade is planned
|
- name: Remove the old smart executor files if we want it deinstalled
|
||||||
file: path={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }} state=absent
|
file: path={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }} state=absent
|
||||||
when: smartgears_upgrade
|
notify: Restart smartgears
|
||||||
|
|
||||||
- name: Remove the smart executor files if we want to remove it
|
become: True
|
||||||
file: path={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }} state=absent
|
become_user: '{{ smartgears_user }}'
|
||||||
when: remove_smart_executor_install
|
when: not smart_executor_install or remove_smart_executor_install
|
||||||
|
tags: [ 'smartgears', 'smart_executor', 'tomcat' ]
|
||||||
|
|
||||||
|
- block:
|
||||||
# NOTE: Install as the smartgears user so we do not mess with the permissions
|
# NOTE: Install as the smartgears user so we do not mess with the permissions
|
||||||
- name: Get the smart executor plugin
|
- name: Get the smart executor plugin
|
||||||
maven_artifact: artifact_id={{ smart_executor_name }} version={{ smart_executor_version | default('latest') }} group_id={{ smart_executor_group_id }} extension={{ smart_executor_extension | default('war') }} repository_url={{ smart_executor_url }} dest={{ smartgears_user_home }}/{{ smart_executor_file }}
|
maven_artifact: artifact_id={{ smart_executor_name }} version={{ smart_executor_version | default('latest') }} group_id={{ smart_executor_group_id }} extension={{ smart_executor_extension | default('war') }} repository_url={{ smart_executor_url }} dest={{ smartgears_downloads_dir }}/{{ smart_executor_file }}
|
||||||
|
register: smartexecutor_download
|
||||||
|
|
||||||
|
- name: Remove the old smart executor files if an upgrade is planned
|
||||||
|
file: path={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }} state=absent
|
||||||
|
when: ( smartexecutor_download | changed )
|
||||||
|
|
||||||
- name: Create the smart executor working directory
|
- name: Create the smart executor working directory
|
||||||
file: path={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }}
|
file: path={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }}
|
||||||
|
|
||||||
- name: Unarchive the smartexecutor distribution
|
- name: Unarchive the smartexecutor distribution
|
||||||
unarchive: copy=no src={{ smartgears_user_home }}/{{ smart_executor_file }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }} creates={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib
|
unarchive: copy=no src={{ smartgears_downloads_dir }}/{{ smart_executor_file }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }} creates={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib
|
||||||
notify: Restart smartgears
|
notify: Restart smartgears
|
||||||
|
|
||||||
become: True
|
become: True
|
||||||
|
|
Loading…
Reference in New Issue