forked from ISTI-ansible-roles/ansible-roles
32 lines
1.4 KiB
YAML
32 lines
1.4 KiB
YAML
---
|
|
- block:
|
|
- name: Remove the old perform files
|
|
file: path={{ item }} state=absent
|
|
with_items:
|
|
- '{{ smartgears_instance_path }}/webapps/{{ perform_service_name }}'
|
|
- '{{ smartgears_instance_path }}/webapps/{{ perform_service_name }}.{{ perform_extension }}'
|
|
|
|
become: True
|
|
become_user: '{{ d4science_user }}'
|
|
when: not perform_service_install
|
|
tags: [ 'smartgears', 'perform_service', 'tomcat' ]
|
|
|
|
- block:
|
|
- name: Get the perform-service
|
|
maven_artifact: artifact_id={{ perform_service_name }} version={{ perform_service_version | default('latest') }} group_id={{ perform_group_id }} extension={{ perform_extension | default('war') }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_downloads_dir }}/{{ perform_service_file }} verify_checksum=always
|
|
register: perform_service_download
|
|
|
|
- name: Remove the old perform files
|
|
file: path={{ smartgears_instance_path }}/webapps/{{ perform_service_name }} state=absent
|
|
when: perform_service_download is changed
|
|
|
|
- name: Copy the perform war into the webapps directory
|
|
copy: src={{ smartgears_downloads_dir }}/{{ perform_service_file }} dest={{ smartgears_instance_path }}/webapps/{{ perform_service_name }}.{{ perform_extension }} remote_src=yes force=yes
|
|
notify: Restart smartgears
|
|
|
|
become: True
|
|
become_user: '{{ d4science_user }}'
|
|
when: perform_service_install
|
|
tags: [ 'smartgears', 'perform_service', 'tomcat' ]
|
|
|