forked from ISTI-ansible-roles/ansible-roles
Add the http proxy servlet role. Heavily smartgeard dependent.
This commit is contained in:
parent
f1b5fc2eaa
commit
fb03803f4f
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
http_proxy_servlet_install: False
|
||||
maven_central_base_url: 'https://repo1.maven.org/maven2'
|
||||
http_proxy_servlet_ver: latest
|
||||
http_proxy_servlet_group_id: org.mitre.dsmiley.httpproxy
|
||||
http_proxy_servlet_name: smiley-http-proxy-servlet
|
||||
http_proxy_servlet_extension: jar
|
||||
http_proxy_servlet_file: '{{ http_proxy_servlet_name }}-{{ http_proxy_servlet_ver }}.{{ http_proxy_servlet_extension }}'
|
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
- 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
|
Loading…
Reference in New Issue