DCD-224: Add installation of the ServiceDesk OBR when specified version is "all" or "servicedesk".

This commit is contained in:
Steve Smith
2019-04-29 15:37:44 +10:00
parent 4d7201fd07
commit e32b439ce2
11 changed files with 154 additions and 1 deletions

View File

@@ -27,3 +27,44 @@
with_items:
- 'JVM_MINIMUM_MEMORY'
- 'JVM_MAXIMUM_MEMORY'
# FIXME: The following is a bit of a special-case for now; ideally we
# should convert this into a general plugin-installation task
# (esp. when we get to supporting Portfolio), but there's no use for ATM.
- name: Install ServiceDesk if required
block:
- name: Fetch the latest version data
set_fact:
atl_servicedesk_version_json: "{{ lookup('url', '{{ atl_servicedesk_latest_version_url }}') }}"
- name: Extract the latest version number
set_fact:
atl_servicedesk_version: "{{ atl_servicedesk_version_json.name }}"
- name: Extract the download url
set_fact:
atl_servicedesk_download_url: "{{ atl_servicedesk_version_json._embedded.artifact._links.binary.href }}"
- name: Download ServiceDesk
get_url:
url: "{{ atl_servicedesk_download_url }}"
dest: "{{ atl_servicedesk_download_file }}"
mode: 0640
force: false
- name: Extract the plugin to the shared plugin directory
command: /usr/bin/unzip -jn "{{ atl_servicedesk_download_file }}" "*.jar"
args:
chdir: "{{ atl_product_shared_plugins }}"
creates: "{{ atl_product_shared_plugins }}/*servicedesk*.jar"
warn: false
- name: Make plugins writable by the Jira user
file:
path: "{{ atl_product_shared_plugins }}"
owner: "{{ atl_product_user }}"
group: "{{ atl_product_user }}"
mode: 0750
recurse: true
when: atl_product_bundle == "servicedesk" or atl_product_bundle == "all"