added new tasks

This commit is contained in:
Roberto Cirillo 2019-04-30 09:49:39 +02:00
parent e59adb1c2a
commit 345b127e40
1 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,31 @@
---
- block:
- name: Remove the old files
file: path={{ item }} state=absent
with_items:
- '{{ smartgears_instance_path }}/webapps/{{ ws_explorer_name }}'
- '{{ smartgears_instance_path }}/webapps/{{ ws_explorer_name }}.{{ ws_explorer_extension }}'
become: True
become_user: '{{ d4science_user }}'
when: not ws_explorer_install
tags: [ 'smartgears', 'ws_explorer', 'tomcat' ]
- block:
- name: Get the ws explorer app
maven_artifact: artifact_id={{ ws_explorer_name }} version={{ ws_explorer_version | default('latest') }} group_id={{ ws_explorer_group_id }} extension={{ ws_explorer_extension | default('war') }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_downloads_dir }}/{{ ws_explorer_file }} verify_checksum=always
register: ws_explorer_download
- name: Remove the old ws explorer
file: path={{ smartgears_instance_path }}/webapps/{{ ws_explorer_name }} state=absent
when: ws_explorer_download is changed
- name: Copy the ws explorer war file into the webapps directory
copy: src={{ smartgears_downloads_dir }}/{{ ws_explorer_file }} dest={{ smartgears_instance_path }}/webapps/{{ ws_explorer_name }}.{{ ws_explorer_extension }} remote_src=yes force=yes
notify: Restart smartgears
become: True
become_user: '{{ d4science_user }}'
when: ws_explorer_install
tags: [ 'smartgears', 'ws_explorer', 'tomcat' ]