add logo section

This commit is contained in:
Michael Collins 2021-10-07 12:49:59 +08:00
parent 71b404d9df
commit ecc0437520
2 changed files with 41 additions and 0 deletions

View File

@ -50,6 +50,18 @@
"variable": "matrix_client_element_branding_welcomeBackgroundUrl",
"type": "text"
},
{
"question_name": "Set Welcome Page Logo",
"question_description": "Sets the logo found on the welcome and login page, must be approximately heightXwidth.",
"required": false,
"min": 0,
"max": 1024,
"default": "{{ ext_matrix_client_element_welcome_logo_raw }}",
"choices": "",
"new_question": true,
"variable": "ext_matrix_client_element_welcome_logo_raw",
"type": "text"
},
{
"question_name": "Show Registration Button",
"question_description": "If you show the registration button on the welcome page.",

View File

@ -13,6 +13,35 @@
'matrix_client_element_default_theme': '{{ matrix_client_element_default_theme }}'
'matrix_client_element_registration_enabled': '{{ matrix_client_element_registration_enabled }}'
- name: Record Element-Web custom variables locally on AWX
delegate_to: 127.0.0.1
lineinfile:
path: '{{ awx_cached_matrix_vars }}'
regexp: "^#? *{{ item.key | regex_escape() }}:"
line: "{{ item.key }}: {{ item.value }}"
insertbefore: '# Custom Settings Start'
with_dict:
'ext_matrix_client_element_welcome_logo_raw': '{{ ext_matrix_client_element_welcome_logo_raw }}'
- name: Set custom logo URL locally on AWX if defined
delegate_to: 127.0.0.1
lineinfile:
path: '{{ awx_cached_matrix_vars }}'
regexp: "^#? *{{ item.key | regex_escape() }}:"
line: "{{ item.key }}: {{ item.value }}"
insertafter: '# Element Settings Start'
with_dict:
'matrix_client_element_welcome_logo': '{{ ext_matrix_client_element_welcome_logo_raw }}'
when: ext_matrix_client_element_welcome_logo_raw|trim|length > 0
- name: Remove custom logo URL locally on AWX if not defined
delegate_to: 127.0.0.1
lineinfile:
path: '{{ awx_cached_matrix_vars }}'
regexp: "^matrix_client_element_welcome_logo: "
state: absent
when: ext_matrix_client_element_welcome_logo_raw|trim|length == 0
- name: Set fact for 'https' string
set_fact:
awx_https_string: "https"