forked from ISTI-ansible-roles/ansible-roles
30 lines
1.5 KiB
YAML
30 lines
1.5 KiB
YAML
|
---
|
||
|
- block:
|
||
|
- name: Remove the old quota plugin
|
||
|
shell: rm -f {{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ quota_se_plugin_artifact_id }}-*-jar-with-dependencies.jar
|
||
|
notify: Restart smartgears
|
||
|
|
||
|
become: True
|
||
|
become_user: '{{ smartgears_user }}'
|
||
|
when: not quota_se_plugin_install
|
||
|
tags: [ 'smartgears', 'quota_se', 'tomcat' ]
|
||
|
|
||
|
- block:
|
||
|
- name: Get the quota plugin and install it inside the smart executor
|
||
|
maven_artifact: artifact_id={{ quota_se_plugin_name }} version={{ quota_se_plugin_version | default(omit) }} group_id={{ quota_se_plugin_group_id }} extension={{ quota_se_plugin_extension | default('war') }} repository_url={{ smartgears_global_base_url }} classifier={{ quota_se_plugin_classifier }} dest={{ smartgears_downloads_dir }}/{{ quota_se_plugin_file }}
|
||
|
register: quota_storage_download
|
||
|
|
||
|
- name: Remove the old quota plugin
|
||
|
shell: rm -f {{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ quota_se_plugin_maven_artifact_id }}-*-jar-with-dependencies.jar
|
||
|
when: (quota_storage_download | changed)
|
||
|
|
||
|
- name: Copy the quota plugin to its final destination
|
||
|
copy: src={{ smartgears_downloads_dir }}/{{ quota_se_plugin_file }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ quota_se_plugin_file }} remote_src=yes
|
||
|
notify: Restart smartgears
|
||
|
|
||
|
become: True
|
||
|
become_user: '{{ smartgears_user }}'
|
||
|
when: quota_se_plugin_install
|
||
|
tags: [ 'smartgears', 'quota_se', 'tomcat' ]
|
||
|
|