Files
dc-deployments-automation/roles/jira_config/tasks/main.yml
2019-05-08 13:07:44 +10:00

72 lines
2.0 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_versioned }}/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_versioned }}/bin/setenv.sh"
backrefs: true
regexp: "^{{ item }}="
line: "{{ item }}=\"{{ atl_jvm_heap }}\""
with_items:
- 'JVM_MINIMUM_MEMORY'
- 'JVM_MAXIMUM_MEMORY'
- name: Create application directories
file:
path: "{{ item }}"
state: directory
mode: 0750
owner: "{{ atl_product_user }}"
group: "{{ atl_product_user }}"
with_items:
- "{{ atl_product_home }}"
- "{{ atl_product_home_shared }}"
- "{{ atl_product_shared_plugins }}"
changed_when: false # For Molecule idempotence check
- name: Limit permissions on the installation directory
file:
path: "{{ atl_product_installation_versioned }}"
owner: "root"
group: "root"
mode: "u=rwX,g=rX,o=rX"
recurse: true
with_items:
- "{{ atl_installer_temp }}"
- "{{ atl_product_installation_versioned }}"
- "{{ atl_product_version_cache_dir }}"
changed_when: false # For Molecule idempotence check
- name: Grant access to the product working directories
file:
path: "{{ item }}"
state: directory
mode: "u=rwX,g=rX,o-a"
owner: "{{ atl_product_user }}"
group: "{{ atl_product_user }}"
recurse: true
with_items:
- "{{ atl_product_installation_versioned }}/logs"
- "{{ atl_product_installation_versioned }}/temp"
- "{{ atl_product_installation_versioned }}/work"
changed_when: false # For Molecule idempotence check