mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-13 08:23:06 -06:00
87 lines
2.7 KiB
YAML
87 lines
2.7 KiB
YAML
---
|
||
|
||
- name: Create crowd.cfg.xml
|
||
template:
|
||
src: crowd.cfg.xml.j2
|
||
dest: "{{ atl_product_home_shared }}/crowd.cfg.xml"
|
||
|
||
- name: Create server config
|
||
template:
|
||
src: server.xml.j2
|
||
dest: "{{ atl_product_installation_versioned }}/apache-tomcat/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 }}/apache-tomcat/bin/setenv.sh"
|
||
backrefs: true
|
||
regexp: "^{{ item }}="
|
||
line: "{{ item }}=\"{{ atl_jvm_heap }}\""
|
||
with_items:
|
||
- 'JVM_MINIMUM_MEMORY'
|
||
- 'JVM_MAXIMUM_MEMORY'
|
||
|
||
- name: Set Crowd home directory
|
||
lineinfile:
|
||
path: "{{ atl_product_installation_versioned }}/apache-tomcat/bin/setenv.sh"
|
||
regexp: "CROWD_HOME="
|
||
line: 'CROWD_HOME="{{ atl_product_home }}"'
|
||
|
||
- name: Set Crowd home directory in crowd-init.properties file
|
||
lineinfile:
|
||
path: "{{ atl_product_installation_versioned }}/crowd-webapp/WEB-INF/classes/crowd-init.properties"
|
||
line: 'crowd.home="{{ atl_product_home }}"'
|
||
|
||
- name: Set the Tomcat environment
|
||
lineinfile:
|
||
path: "{{ atl_product_installation_versioned }}/apache-tomcat/bin/setenv.sh"
|
||
insertafter: "EOF"
|
||
line: 'export CATALINA_OPTS="${CATALINA_OPTS} {{ atl_catalina_opts }} {{ atl_catalina_opts_extra }}"'
|
||
|
||
- name: Set JAVA_HOME
|
||
lineinfile:
|
||
path: "{{ atl_product_installation_versioned }}/apache-tomcat/bin/setenv.sh"
|
||
insertafter: "EOF"
|
||
line: 'export JAVA_HOME=/usr/lib/jvm/jre-1.8.0-openjdk-1.8.0.201.b09-0.amzn2.x86_64'
|
||
|
||
- 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-rwx"
|
||
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
|