ansible-roles/smartgears/http-proxy-servlet/tasks/main.yml

30 lines
1.5 KiB
YAML

---
- block:
- name: Remove the old http-proxy-servlet files
file: path='{{ smartgears_instance_path }}/{{ http_proxy_servlet_name }}.{{ http_proxy_servlet_extension }}' state=absent
notify: Restart smartgears
become: True
become_user: '{{ d4science_user }}'
tags: [ 'smartgears', 'http_proxy_servlet', 'tomcat' ]
when: not http_proxy_servlet_install
- block:
- name: Get the http-proxy-servlet jar
maven_artifact: artifact_id={{ http_proxy_servlet_name }} version={{ http_proxy_servlet_version | default(omit) }} group_id='{{ http_proxy_servlet_group_id }}' extension={{ http_proxy_servlet_extension | default('war') }} repository_url={{ maven_central_base_url }} dest={{ smartgears_downloads_dir }}/{{ http_proxy_servlet_file }} verify_checksum=always
register: http_proxy_servlet_download
- name: Remove the old http-proxy-servlet files
file: path='{{ smartgears_instance_path }}/{{ http_proxy_servlet_name }}.{{ http_proxy_servlet_extension }}' state=absent
notify: Restart smartgears
when: http_proxy_servlet_download is changed
- name: Copy the http-proxy-servlet war file into the webapps directory
copy: src={{ smartgears_downloads_dir }}/{{ http_proxy_servlet_file }} dest={{ smartgears_instance_path }}/lib/{{ http_proxy_servlet_name }}.{{ http_proxy_servlet_extension }} remote_src=yes force=yes
notify: Restart smartgears
become: True
become_user: '{{ d4science_user }}'
tags: [ 'smartgears', 'http_proxy_servlet', 'tomcat' ]
when: http_proxy_servlet_install