mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-13 16:33:08 -06:00
71 lines
2.3 KiB
YAML
71 lines
2.3 KiB
YAML
---
|
|
|
|
- name: Create database config
|
|
template:
|
|
src: dbconfig.xml.j2
|
|
dest: "{{ atl_product_home }}/dbconfig.xml"
|
|
owner: "{{ atl_product_user }}"
|
|
|
|
- name: Create cluster config
|
|
template:
|
|
src: cluster.properties.j2
|
|
dest: "{{ atl_product_home }}/cluster.properties"
|
|
owner: "{{ atl_product_user }}"
|
|
|
|
- name: Create server config
|
|
template:
|
|
src: server.xml.j2
|
|
dest: "{{ atl_product_installation_target }}/conf/server.xml"
|
|
|
|
- name: Override JVM memory settings.
|
|
# Ugly but necessary as the product installs this file so we need to make the change here.
|
|
lineinfile:
|
|
path: "{{ atl_product_installation_target }}/bin/setenv.sh"
|
|
backrefs: true
|
|
regexp: "^{{ item }}="
|
|
line: "{{ item }}=\"{{ atl_jvm_heap }}\""
|
|
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: Extract the Jira major version, default to 8 if not found or 'latest'
|
|
set_fact:
|
|
atl_jira_major_version: "{{ atl_product_version | regex_search('^\\d+') | default('8', true) }}"
|
|
- name: Extract the latest version number
|
|
set_fact:
|
|
atl_servicedesk_version: "{{ atl_servicedesk_download_map[atl_jira_major_version].version }}"
|
|
- name: Extract the download url
|
|
set_fact:
|
|
atl_servicedesk_download_url: "{{ atl_servicedesk_download_map[atl_jira_major_version].url }}"
|
|
|
|
- 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"
|