ITOPSENG-277 handle updating base_url

This commit is contained in:
Brett Meehan
2019-11-28 14:35:41 +11:00
parent 49066285a8
commit c3fd34b134
4 changed files with 20 additions and 5 deletions

View File

@@ -7,10 +7,12 @@
atl_product_family: "confluence" atl_product_family: "confluence"
atl_product_user: "confluence" atl_product_user: "confluence"
atl_product_edition: "confluence" atl_product_edition: "confluence"
atl_jdbc_encoding: 'UTF-8' atl_jdbc_encoding: 'UTF-8'
atl_jdbc_collation: 'en_US.UTF-8' atl_jdbc_collation: 'en_US.UTF-8'
vars_files:
- /etc/atl_vars.yml
roles: roles:
- role: linux_common - role: linux_common
- role: aws_common - role: aws_common

View File

@@ -10,6 +10,8 @@ ENV_FILE=${4:-"/etc/atl"}
export PATH=/usr/local/bin:$PATH export PATH=/usr/local/bin:$PATH
# get /etc/atl into usable vars which can be included in ansible playbooks
grep -v PASSWORD /etc/atl | sed -r -e 's/(^.+)(=)(.*$)/\L\1:\ \3/g' > /etc/atl_vars.yml
# Set the environment with default exports # Set the environment with default exports
set -a set -a

View File

@@ -52,7 +52,6 @@
owner: "{{ atl_product_user }}" owner: "{{ atl_product_user }}"
group: "{{ atl_product_user }}" group: "{{ atl_product_user }}"
- name: Limit permissions on the installation directory - name: Limit permissions on the installation directory
file: file:
path: "{{ atl_product_installation_versioned }}" path: "{{ atl_product_installation_versioned }}"
@@ -79,3 +78,15 @@
- "{{ atl_product_installation_versioned }}/temp" - "{{ atl_product_installation_versioned }}/temp"
- "{{ atl_product_installation_versioned }}/work" - "{{ atl_product_installation_versioned }}/work"
changed_when: false # For Molecule idempotence check changed_when: false # For Molecule idempotence check
- name: Assert baseurl to same as atl_proxy_name
postgresql_query:
login_host: "{{ atl_db_host }}"
login_user: "{{ atl_jdbc_user }}"
login_password: "{{ atl_jdbc_password }}"
db: "{{ atl_jdbc_db_name }}"
query: update bandana set bandanavalue=regexp_replace(%s, %s, %s) where bandanacontext = '_GLOBAL' and bandanakey = 'atlassian.confluence.settings';
positional_args:
- bandanavalue
- <baseUrl>.*</baseUrl>
- "<baseUrl>{{ atl_tomcat_scheme }}://{{ atl_proxy_name }}</baseUrl>"

View File

@@ -1,4 +1,4 @@
<security-config> grep <security-config>
<parameters> <parameters>
<init-param> <init-param>
<param-name>login.url</param-name> <param-name>login.url</param-name>
@@ -17,7 +17,7 @@
<param-value>seraph.confluence</param-value> <param-value>seraph.confluence</param-value>
</init-param> </init-param>
{% if atl_autologin_cookie_age is defined and atl_autologin_cookie_age|length %} {% if atl_autologin_cookie_age is defined and atl_autologin_cookie_age is not none %}
<init-param> <init-param>
<param-name>autologin.cookie.age</param-name> <param-name>autologin.cookie.age</param-name>
<param-value>{{ atl_autologin_cookie_age }}</param-value> <param-value>{{ atl_autologin_cookie_age }}</param-value>