From 46cba52e79b52e14278ee5a1c52c75f0ee2c89cf Mon Sep 17 00:00:00 2001 From: Michael Collins Date: Mon, 11 Oct 2021 15:00:11 +0800 Subject: [PATCH] update element section --- .../matrix-awx/tasks/set_variables_element.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/roles/matrix-awx/tasks/set_variables_element.yml b/roles/matrix-awx/tasks/set_variables_element.yml index 64435a8be..491c91b3b 100755 --- a/roles/matrix-awx/tasks/set_variables_element.yml +++ b/roles/matrix-awx/tasks/set_variables_element.yml @@ -12,10 +12,10 @@ 'matrix_client_element_jitsi_preferredDomain': 'jitsi.{{ matrix_domain }}' 'matrix_client_element_default_theme': '{{ matrix_client_element_default_theme }}' 'matrix_client_element_registration_enabled': '{{ matrix_client_element_registration_enabled }}' - 'matrix_client_element_brand': '{{ matrix_client_element_brand }}' - 'matrix_client_element_branding_welcomeBackgroundUrl': '{{ matrix_client_element_branding_welcomeBackgroundUrl }}' - 'matrix_client_element_welcome_logo': '{{ matrix_client_element_welcome_logo }}' - 'matrix_client_element_welcome_logo_link': '{{ matrix_client_element_welcome_logo_link }}' + 'matrix_client_element_brand': '{{ matrix_client_element_brand | trim }}' + 'matrix_client_element_branding_welcomeBackgroundUrl': '{{ matrix_client_element_branding_welcomeBackgroundUrl | trim }}' + 'matrix_client_element_welcome_logo': '{{ matrix_client_element_welcome_logo | trim }}' + 'matrix_client_element_welcome_logo_link': '{{ matrix_client_element_welcome_logo_link | trim }}' - name: Record Element-Web custom variables locally on AWX delegate_to: 127.0.0.1 @@ -25,8 +25,8 @@ line: "{{ item.key }}: '{{ item.value }}'" insertbefore: '# Element Settings End' with_dict: - 'awx_matrix_client_element_welcome_headline': '{{ awx_matrix_client_element_welcome_headline }}' - 'awx_matrix_client_element_welcome_text': '{{ awx_matrix_client_element_welcome_text }}' + 'awx_matrix_client_element_welcome_headline': '{{ awx_matrix_client_element_welcome_headline | trim }}' + 'awx_matrix_client_element_welcome_text': '{{ awx_matrix_client_element_welcome_text | trim }}' - name: Set Element-Web custom branding locally on AWX delegate_to: 127.0.0.1 @@ -135,8 +135,8 @@ line: "{{ item.key }}: '{{ item.value }}'" insertafter: '# Element Settings Start' with_dict: - 'matrix_client_element_branding_welcomeBackgroundUrl': '{{ awx_matrix_client_element_branding_welcomeBackgroundUrl }}' - when: awx_matrix_client_element_branding_welcomeBackgroundUrl | trim | length > 0 + 'matrix_client_element_branding_welcomeBackgroundUrl': '{{ matrix_client_element_branding_welcomeBackgroundUrl }}' + when: matrix_client_element_branding_welcomeBackgroundUrl | trim | length > 0 - name: Remove Element-Web background locally on AWX if not defined delegate_to: 127.0.0.1 @@ -144,7 +144,7 @@ path: '{{ awx_cached_matrix_vars }}' regexp: "^matrix_client_element_branding_welcomeBackgroundUrl: " state: absent - when: awx_matrix_client_element_branding_welcomeBackgroundUrl | trim | length == 0 + when: matrix_client_element_branding_welcomeBackgroundUrl | trim | length == 0 - name: Save new 'Configure Element' survey.json to the AWX tower, template delegate_to: 127.0.0.1