|
|
|
@ -2,12 +2,12 @@
|
|
|
|
|
- name: Limit max upload size to 200MB part 1
|
|
|
|
|
set_fact:
|
|
|
|
|
matrix_synapse_max_upload_size_mb: "200"
|
|
|
|
|
when: matrix_synapse_max_upload_size_mb_raw|int >= 200
|
|
|
|
|
when: awx_synapse_max_upload_size_mb | int >= 200
|
|
|
|
|
|
|
|
|
|
- name: Limit max upload size to 200MB part 2
|
|
|
|
|
set_fact:
|
|
|
|
|
matrix_synapse_max_upload_size_mb: "{{ matrix_synapse_max_upload_size_mb_raw }}"
|
|
|
|
|
when: matrix_synapse_max_upload_size_mb_raw|int < 200
|
|
|
|
|
matrix_synapse_max_upload_size_mb: "{{ awx_synapse_max_upload_size_mb }}"
|
|
|
|
|
when: awx_synapse_max_upload_size_mb | int < 200
|
|
|
|
|
|
|
|
|
|
- name: Record Synapse variables locally on AWX
|
|
|
|
|
delegate_to: 127.0.0.1
|
|
|
|
@ -32,13 +32,13 @@
|
|
|
|
|
path: '{{ awx_cached_matrix_vars }}'
|
|
|
|
|
regexp: "^matrix_synapse_auto_join_rooms: .*$"
|
|
|
|
|
replace: "matrix_synapse_auto_join_rooms: []"
|
|
|
|
|
when: matrix_synapse_auto_join_rooms_raw|length == 0
|
|
|
|
|
when: awx_synapse_auto_join_rooms | length == 0
|
|
|
|
|
|
|
|
|
|
- name: If the raw inputs is not empty start constructing parsed auto_join_rooms list
|
|
|
|
|
set_fact:
|
|
|
|
|
matrix_synapse_auto_join_rooms_array: |-
|
|
|
|
|
{{ matrix_synapse_auto_join_rooms_raw.splitlines() | to_json }}
|
|
|
|
|
when: matrix_synapse_auto_join_rooms_raw|length > 0
|
|
|
|
|
awx_synapse_auto_join_rooms_array: |-
|
|
|
|
|
{{ awx_synapse_auto_join_rooms.splitlines() | to_json }}
|
|
|
|
|
when: awx_synapse_auto_join_rooms|length > 0
|
|
|
|
|
|
|
|
|
|
- name: Record Synapse variable 'matrix_synapse_auto_join_rooms' locally on AWX, if it's not blank
|
|
|
|
|
delegate_to: 127.0.0.1
|
|
|
|
@ -48,8 +48,8 @@
|
|
|
|
|
line: "{{ item.key }}: {{ item.value }}"
|
|
|
|
|
insertafter: '# Synapse Settings Start'
|
|
|
|
|
with_dict:
|
|
|
|
|
"matrix_synapse_auto_join_rooms": "{{ matrix_synapse_auto_join_rooms_array }}"
|
|
|
|
|
when: matrix_synapse_auto_join_rooms_raw|length > 0
|
|
|
|
|
"matrix_synapse_auto_join_rooms": "{{ awx_synapse_auto_join_rooms_array }}"
|
|
|
|
|
when: awx_synapse_auto_join_rooms|length > 0
|
|
|
|
|
|
|
|
|
|
- name: Record Synapse Shared Secret if it's defined
|
|
|
|
|
delegate_to: 127.0.0.1
|
|
|
|
@ -60,7 +60,7 @@
|
|
|
|
|
insertafter: '# Synapse Settings Start'
|
|
|
|
|
with_dict:
|
|
|
|
|
'matrix_synapse_registration_shared_secret': '{{ awx_matrix_synapse_registration_shared_secret }}'
|
|
|
|
|
when: awx_matrix_synapse_registration_shared_secret|length > 0
|
|
|
|
|
when: awx_matrix_synapse_registration_shared_secret | length > 0
|
|
|
|
|
|
|
|
|
|
- name: Record registations_require_3pid extra variable if true
|
|
|
|
|
delegate_to: 127.0.0.1
|
|
|
|
@ -72,7 +72,7 @@
|
|
|
|
|
with_items:
|
|
|
|
|
- " registrations_require_3pid:"
|
|
|
|
|
- " - email"
|
|
|
|
|
when: awx_registrations_require_3pid|bool
|
|
|
|
|
when: awx_registrations_require_3pid | bool
|
|
|
|
|
|
|
|
|
|
- name: Remove registrations_require_3pid extra variable if false
|
|
|
|
|
delegate_to: 127.0.0.1
|
|
|
|
@ -85,7 +85,7 @@
|
|
|
|
|
with_items:
|
|
|
|
|
- " registrations_require_3pid:"
|
|
|
|
|
- " - email"
|
|
|
|
|
when: not awx_registrations_require_3pid|bool
|
|
|
|
|
when: not awx_registrations_require_3pid | bool
|
|
|
|
|
|
|
|
|
|
- name: Remove URL Languages
|
|
|
|
|
delegate_to: 127.0.0.1
|
|
|
|
@ -98,12 +98,12 @@
|
|
|
|
|
- name: Set URL languages default if raw inputs empty
|
|
|
|
|
set_fact:
|
|
|
|
|
awx_url_preview_accept_language_default: 'en'
|
|
|
|
|
when: awx_url_preview_accept_language_raw|length == 0
|
|
|
|
|
when: awx_url_preview_accept_language | length == 0
|
|
|
|
|
|
|
|
|
|
- name: Set URL languages default if raw inputs not empty
|
|
|
|
|
set_fact:
|
|
|
|
|
awx_url_preview_accept_language_default: "{{ awx_url_preview_accept_language_raw }}"
|
|
|
|
|
when: awx_url_preview_accept_language_raw|length > 0
|
|
|
|
|
awx_url_preview_accept_language_default: "{{ awx_url_preview_accept_language }}"
|
|
|
|
|
when: awx_url_preview_accept_language|length > 0
|
|
|
|
|
|
|
|
|
|
- name: Set URL languages if raw inputs empty
|
|
|
|
|
delegate_to: 127.0.0.1
|
|
|
|
@ -111,7 +111,7 @@
|
|
|
|
|
path: '{{ awx_cached_matrix_vars }}'
|
|
|
|
|
insertafter: '^ url_preview_accept_language:'
|
|
|
|
|
line: " - {{ awx_url_preview_accept_language_default }}"
|
|
|
|
|
when: awx_url_preview_accept_language_raw|length == 0
|
|
|
|
|
when: awx_url_preview_accept_language|length == 0
|
|
|
|
|
|
|
|
|
|
- name: Set URL languages if raw inputs not empty
|
|
|
|
|
delegate_to: 127.0.0.1
|
|
|
|
@ -119,8 +119,8 @@
|
|
|
|
|
path: '{{ awx_cached_matrix_vars }}'
|
|
|
|
|
insertafter: '^ url_preview_accept_language:'
|
|
|
|
|
line: " - {{ item }}"
|
|
|
|
|
with_items: "{{ awx_url_preview_accept_language_raw.splitlines() }}"
|
|
|
|
|
when: awx_url_preview_accept_language_raw|length > 0
|
|
|
|
|
with_items: "{{ awx_url_preview_accept_language.splitlines() }}"
|
|
|
|
|
when: awx_url_preview_accept_language | length > 0
|
|
|
|
|
|
|
|
|
|
- name: Remove Federation Whitelisting 1
|
|
|
|
|
delegate_to: 127.0.0.1
|
|
|
|
@ -143,7 +143,7 @@
|
|
|
|
|
path: '{{ awx_cached_matrix_vars }}'
|
|
|
|
|
insertafter: '^matrix_synapse_configuration_extension_yaml: \|'
|
|
|
|
|
line: " federation_domain_whitelist:"
|
|
|
|
|
when: awx_federation_whitelist_raw|length > 0
|
|
|
|
|
when: awx_federation_whitelist | length > 0
|
|
|
|
|
|
|
|
|
|
- name: Set Federation Whitelisting 2
|
|
|
|
|
delegate_to: 127.0.0.1
|
|
|
|
@ -151,8 +151,8 @@
|
|
|
|
|
path: '{{ awx_cached_matrix_vars }}'
|
|
|
|
|
insertafter: '^ federation_domain_whitelist:'
|
|
|
|
|
line: " - {{ item }}"
|
|
|
|
|
with_items: "{{ awx_federation_whitelist_raw.splitlines() }}"
|
|
|
|
|
when: awx_federation_whitelist_raw|length > 0
|
|
|
|
|
with_items: "{{ awx_federation_whitelist.splitlines() }}"
|
|
|
|
|
when: awx_federation_whitelist | length > 0
|
|
|
|
|
|
|
|
|
|
- name: Set awx_recaptcha_public_key to a 'public-key' if undefined
|
|
|
|
|
set_fact: awx_recaptcha_public_key="public-key"
|
|
|
|
@ -180,9 +180,9 @@
|
|
|
|
|
path: '{{ awx_cached_matrix_vars }}'
|
|
|
|
|
regexp: "^#? *{{ item.key | regex_escape() }}:"
|
|
|
|
|
line: "{{ item.key }}: {{ item.value }}"
|
|
|
|
|
insertafter: '# Custom Settings Start'
|
|
|
|
|
insertbefore: '# Synapse Settings End'
|
|
|
|
|
with_dict:
|
|
|
|
|
'awx_federation_whitelist_raw': '{{ awx_federation_whitelist_raw.splitlines() | to_json }}'
|
|
|
|
|
'awx_federation_whitelist': '{{ awx_federation_whitelist.splitlines() | to_json }}'
|
|
|
|
|
'awx_url_preview_accept_language_default': '{{ awx_url_preview_accept_language_default.splitlines() | to_json }}'
|
|
|
|
|
'awx_enable_registration_captcha': '{{ awx_enable_registration_captcha }}'
|
|
|
|
|
'awx_recaptcha_public_key': '"{{ awx_recaptcha_public_key }}"'
|
|
|
|
|