WPTIN-15452 Change base_url assert to support the change in Confluence 10.1+ to plugin_setting

This commit is contained in:
Glenn Stewart
2025-11-03 15:31:37 +11:00
parent ac4b73fd98
commit 57ad066661

View File

@@ -125,17 +125,36 @@
changed_when: false # For Molecule idempotence check
- name: Assert baseurl to same as atl_proxy_name
community.postgresql.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(bandanavalue, %s, %s)
where bandanacontext = '_GLOBAL' and bandanakey = 'atlassian.confluence.settings';
positional_args:
- "<baseUrl>.*</baseUrl>"
- "<baseUrl>{{ atl_tomcat_scheme }}://{{ atl_proxy_name }}{{ atl_tomcat_contextpath }}</baseUrl>"
block:
# For Confluence 10.1+ - use plugin_setting table with JSON format
- name: Assert baseurl to same as atl_proxy_name (Confluence 10.1+)
community.postgresql.postgresql_query:
login_host: "{{ atl_db_host }}"
login_user: "{{ atl_jdbc_user }}"
login_password: "{{ atl_jdbc_password }}"
db: "{{ atl_jdbc_db_name }}"
query: >
update plugin_setting set setting_value=regexp_replace(setting_value, %s, %s)
where namespace = '_GLOBAL' and setting_key = 'atlassian.confluence.settings';
positional_args:
- "\"baseUrl\":.*?,"
- "\"baseUrl\":\"{{ atl_tomcat_scheme }}://{{ atl_proxy_name }}{{ atl_tomcat_contextpath }}\","
when: atl_product_version is version('10.1', '>=')
# For Confluence < 10.1 - use bandana table with XML format
- name: Assert baseurl to same as atl_proxy_name (Confluence < 10.1)
community.postgresql.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(bandanavalue, %s, %s)
where bandanacontext = '_GLOBAL' and bandanakey = 'atlassian.confluence.settings';
positional_args:
- "<baseUrl>.*</baseUrl>"
- "<baseUrl>{{ atl_tomcat_scheme }}://{{ atl_proxy_name }}{{ atl_tomcat_contextpath }}</baseUrl>"
when: atl_product_version is version('10.1', '<')
when:
- atl_proxy_name is defined
- atl_tomcat_scheme is defined