forked from ISTI-ansible-roles/ansible-roles
is-sweeper-se-plugin: better use of the maven_artifact module.
This commit is contained in:
parent
4019916c68
commit
71b54c7e05
|
@ -1,11 +1,25 @@
|
||||||
---
|
---
|
||||||
- block:
|
- block:
|
||||||
- name: Remove the old is-sweeper plugin
|
- name: Remove the old is-sweeper plugin
|
||||||
shell: rm -f {{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/is-sweeper-se-plugin-*-jar-with-dependencies.jar
|
shell: rm -f {{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ is_sweeper_se_plugin_name }}-*-{{ is_sweeper_se_plugin_classifier }}.{{ is_sweeper_se_plugin_extension }}
|
||||||
when: is_sweeper_se_plugin_upgrade
|
notify: Restart smartgears
|
||||||
|
|
||||||
|
become: True
|
||||||
|
become_user: '{{ smartgears_user }}'
|
||||||
|
when: not is_sweeper_se_plugin_install
|
||||||
|
tags: [ 'smartgears', 'is_sweeper_se', 'tomcat' ]
|
||||||
|
|
||||||
|
- block:
|
||||||
|
- name: Download the is-sweeper plugin
|
||||||
|
maven_artifact: artifact_id={{ is_sweeper_se_plugin_name }} version={{ is_sweeper_se_plugin_version | default('latest') }} group_id={{ is_sweeper_se_plugin_group_id }} extension={{ is_sweeper_se_plugin_extension }} repository_url={{ smartgears_global_base_url }} classifier={{ is_sweeper_se_plugin_classifier }} dest={{ smartgears_downloads_dir }}/{{ is_sweeper_se_plugin_file }}
|
||||||
|
register: is_sweeper_plugin_download
|
||||||
|
|
||||||
|
- name: Remove the old is-sweeper plugin
|
||||||
|
shell: rm -f {{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ is_sweeper_se_plugin_name }}-*-{{ is_sweeper_se_plugin_classifier }}.{{ is_sweeper_se_plugin_extension }}
|
||||||
|
when: ( is_sweeper_plugin_download )
|
||||||
|
|
||||||
- name: Install the is-sweeper plugin inside the smart executor lib directory
|
- name: Install the is-sweeper plugin inside the smart executor lib directory
|
||||||
maven_artifact: artifact_id={{ is_sweeper_se_plugin_name }} version={{ is_sweeper_se_plugin_version | default(omit) }} group_id={{ is_sweeper_se_plugin_group_id }} extension={{ is_sweeper_se_plugin_extension | default('war') }} repository_url={{ smartgears_global_base_url }} classifier={{ is_sweeper_se_plugin_classifier }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ is_sweeper_se_plugin_file }}
|
copy: src={{ smartgears_downloads_dir }}/{{ is_sweeper_se_plugin_file }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ is_sweeper_se_plugin_file }} remote_src=yes force=yes
|
||||||
notify: Restart smartgears
|
notify: Restart smartgears
|
||||||
|
|
||||||
become: True
|
become: True
|
||||||
|
|
Loading…
Reference in New Issue