Fixed the is_exporter_se plugin to make a better use of maven_artifact.

This commit is contained in:
Andrea Dell'Amico 2017-11-23 19:17:03 +01:00
parent a40456ea1c
commit 501204253a
2 changed files with 19 additions and 6 deletions

View File

@ -1,11 +1,24 @@
---
- block:
- name: Remove the old is-exporter plugin
shell: rm -f {{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/is-exporter-se-plugin-*-jar-with-dependencies.jar
when: is_exporter_se_plugin_upgrade
shell: rm -f {{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ is_exporter_se_plugin_name }}-*-{{ is_exporter_se_plugin_classifier }}.{{ is_exporter_se_plugin_extension }}
notify: Restart smartgears
become: True
become_user: '{{ smartgears_user }}'
when: not is_exporter_se_plugin_install
tags: [ 'smartgears', 'is_exporter_se', 'tomcat' ]
- name: Download the is-exporter plugin
maven_artifact: artifact_id={{ is_exporter_se_plugin_name }} version={{ is_exporter_se_plugin_version | default(omit) }} group_id={{ is_exporter_se_plugin_group_id }} extension={{ is_exporter_se_plugin_extension | default('war') }} repository_url={{ smartgears_global_base_url }} classifier={{ is_exporter_se_plugin_classifier }} dest={{ smartgears_downloads_dir }}/{{ is_exporter_se_plugin_file }}
register: is_exporter_plugin_download
- name: Remove the old is-exporter plugin
shell: rm -f {{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ is_exporter_se_plugin_name }}-*-{{ is_exporter_se_plugin_classifier }}.{{ is_exporter_se_plugin_extension }}
when: ( is_exporter_plugin_download | changed )
- name: Install the is-exporter plugin inside the smart executor lib directory
maven_artifact: artifact_id={{ is_exporter_se_plugin_name }} version={{ is_exporter_se_plugin_version | default(omit) }} group_id={{ is_exporter_se_plugin_group_id }} extension={{ is_exporter_se_plugin_extension | default('war') }} repository_url={{ smartgears_global_base_url }} classifier={{ is_exporter_se_plugin_classifier }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ is_exporter_se_plugin_file }}
copy: src={{ smartgears_downloads_dir }}/{{ is_exporter_se_plugin_file }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ is_exporter_se_plugin_file }} remote_src=yes force=yes
notify: Restart smartgears
become: True

View File

@ -16,7 +16,7 @@
- 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 )
when: ( is_sweeper_plugin_download | changed )
- name: Install the is-sweeper plugin inside the smart executor lib directory
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