forked from ISTI-ansible-roles/ansible-roles
47 lines
2.3 KiB
YAML
47 lines
2.3 KiB
YAML
---
|
|
- block:
|
|
- name: Remove the old uri-resolver files
|
|
file: path={{ item }} state=absent
|
|
with_items:
|
|
- '{{ smartgears_instance_path }}/webapps/{{ uri_resolver_name }}'
|
|
- '{{ smartgears_instance_path }}/webapps/{{ uri_resolver_name }}.{{ uri_resolver_extension }}'
|
|
notify: Restart smartgears
|
|
|
|
become: True
|
|
become_user: '{{ d4science_user }}'
|
|
tags: [ 'smartgears', 'uri_resolver', 'tomcat' ]
|
|
when: not smartgears_uri_resolver_install
|
|
|
|
- block:
|
|
- name: Get the uri-resolver war
|
|
maven_artifact: artifact_id={{ uri_resolver_name }} version={{ uri_resolver_version | default(omit) }} group_id={{ uri_resolver_group_id }} extension={{ uri_resolver_extension | default('war') }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_downloads_dir }}/{{ uri_resolver_file }} verify_checksum=always
|
|
register: uri_resolver_download
|
|
|
|
- name: Remove the old uri-resolver files
|
|
file: path={{ smartgears_instance_path }}/webapps/{{ uri_resolver_name }} state=absent
|
|
notify: Restart smartgears
|
|
when: uri_resolver_download is changed
|
|
|
|
- name: Create the uri-resolver webapp directory
|
|
file: dest={{ smartgears_instance_path }}/webapps/{{ uri_resolver_name }} state=directory
|
|
when: uri_resolver_download
|
|
|
|
- name: Unarchive the uri_resolver war file
|
|
unarchive: copy=no src={{ smartgears_downloads_dir }}/{{ uri_resolver_file }} dest={{ smartgears_instance_path }}/webapps/{{ uri_resolver_name }}
|
|
args:
|
|
creates: '{{ smartgears_instance_path }}/webapps/{{ uri_resolver_name }}/WEB-INF/web.xml'
|
|
notify: Restart smartgears
|
|
|
|
- name: Install the uri_resolver web.xml template
|
|
template: src=uri-resolver-web.xml.j2 dest={{ smartgears_instance_path }}/webapps/{{ uri_resolver_name }}/WEB-INF/web.xml mode=0440
|
|
notify: Restart smartgears
|
|
|
|
# - name: Copy the uri-resolver war file into the webapps directory
|
|
# copy: src={{ smartgears_downloads_dir }}/{{ uri_resolver_file }} dest={{ smartgears_instance_path }}/webapps/{{ uri_resolver_name }}.{{ uri_resolver_extension }} remote_src=yes force=yes
|
|
# notify: Restart smartgears
|
|
|
|
become: True
|
|
become_user: '{{ d4science_user }}'
|
|
tags: [ 'smartgears', 'uri_resolver', 'tomcat' ]
|
|
when: smartgears_uri_resolver_install
|