Skip to content

Commit 9276333

Browse files
update element section
1 parent 676ba70 commit 9276333

File tree

2 files changed

+20
-19
lines changed

2 files changed

+20
-19
lines changed

roles/matrix-awx/surveys/configure_element.json.j2

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
"required": false,
3333
"min": 0,
3434
"max": 256,
35-
"default": "{{ awx_matrix_client_element_brand }}",
35+
"default": "{{ matrix_client_element_brand }}",
3636
"choices": "",
3737
"new_question": true,
38-
"variable": "awx_matrix_client_element_brand",
38+
"variable": "matrix_client_element_brand",
3939
"type": "text"
4040
},
4141
{
@@ -44,10 +44,10 @@
4444
"required": false,
4545
"min": 0,
4646
"max": 1024,
47-
"default": "{{ awx_matrix_client_element_branding_welcomeBackgroundUrl }}",
47+
"default": "{{ matrix_client_element_branding_welcomeBackgroundUrl }}",
4848
"choices": "",
4949
"new_question": true,
50-
"variable": "awx_matrix_client_element_branding_welcomeBackgroundUrl",
50+
"variable": "matrix_client_element_branding_welcomeBackgroundUrl",
5151
"type": "text"
5252
},
5353
{
@@ -56,10 +56,10 @@
5656
"required": false,
5757
"min": 0,
5858
"max": 1024,
59-
"default": "{{ awx_matrix_client_element_welcome_logo }}",
59+
"default": "{{ matrix_client_element_welcome_logo }}",
6060
"choices": "",
6161
"new_question": true,
62-
"variable": "awx_matrix_client_element_welcome_logo",
62+
"variable": "matrix_client_element_welcome_logo",
6363
"type": "text"
6464
},
6565
{
@@ -68,10 +68,10 @@
6868
"required": false,
6969
"min": 0,
7070
"max": 1024,
71-
"default": "{{ awx_matrix_client_element_welcome_logo_link }}",
71+
"default": "{{ matrix_client_element_welcome_logo_link }}",
7272
"choices": "",
7373
"new_question": true,
74-
"variable": "awx_matrix_client_element_welcome_logo_link",
74+
"variable": "matrix_client_element_welcome_logo_link",
7575
"type": "text"
7676
},
7777
{

roles/matrix-awx/tasks/set_variables_element.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
'matrix_client_element_jitsi_preferredDomain': 'jitsi.{{ matrix_domain }}'
1313
'matrix_client_element_default_theme': '{{ matrix_client_element_default_theme }}'
1414
'matrix_client_element_registration_enabled': '{{ matrix_client_element_registration_enabled }}'
15+
'matrix_client_element_brand': '{{ matrix_client_element_brand }}'
16+
'matrix_client_element_branding_welcomeBackgroundUrl:' '{{ matrix_client_element_branding_welcomeBackgroundUrl }}'
17+
'matrix_client_element_welcome_logo': '{{ matrix_client_element_welcome_logo }}'
18+
'matrix_client_element_welcome_logo_link': '{{ matrix_client_element_welcome_logo_link }}'
1519

1620
- name: Record Element-Web custom variables locally on AWX
1721
delegate_to: 127.0.0.1
@@ -21,10 +25,6 @@
2125
line: "{{ item.key }}: '{{ item.value }}'"
2226
insertbefore: '# Element Settings End'
2327
with_dict:
24-
'awx_matrix_client_element_brand': '{{ awx_matrix_client_element_brand }}'
25-
'awx_matrix_client_element_branding_welcomeBackgroundUrl:' '{{ awx_matrix_client_element_branding_welcomeBackgroundUrl }}'
26-
'awx_matrix_client_element_welcome_logo': '{{ awx_matrix_client_element_welcome_logo }}'
27-
'awx_matrix_client_element_welcome_logo_link': '{{ awx_matrix_client_element_welcome_logo_link }}'
2828
'awx_matrix_client_element_welcome_headline': '{{ awx_matrix_client_element_welcome_headline }}'
2929
'awx_matrix_client_element_welcome_text': '{{ awx_matrix_client_element_welcome_text }}'
3030

@@ -36,15 +36,16 @@
3636
line: "{{ item.key }}: '{{ item.value }}'"
3737
insertafter: '# Element Settings Start'
3838
with_dict:
39-
'matrix_client_element_brand': "{{ awx_matrix_client_element_brand }}"
39+
'matrix_client_element_brand': "{{ matrix_client_element_brand }}"
40+
when: matrix_client_element_brand | trim | length > 0
4041

4142
- name: Remove Element-Web custom branding locally on AWX if not defined
4243
delegate_to: 127.0.0.1
4344
lineinfile:
4445
path: '{{ awx_cached_matrix_vars }}'
4546
regexp: "^matrix_client_element_brand: "
4647
state: absent
47-
when: awx_matrix_client_element_brand | trim | length == 0
48+
when: matrix_client_element_brand | trim | length == 0
4849

4950
- name: Set fact for 'https' string
5051
set_fact:
@@ -58,16 +59,16 @@
5859
line: "{{ item.key }}: '{{ item.value }}'"
5960
insertafter: '# Element Settings Start'
6061
with_dict:
61-
'matrix_client_element_welcome_logo': '{{ awx_matrix_client_element_welcome_logo }}'
62-
when: ( awx_https_string in awx_matrix_client_element_welcome_logo ) and ( awx_matrix_client_element_welcome_logo | trim | length > 0 )
62+
'matrix_client_element_welcome_logo': '{{ matrix_client_element_welcome_logo }}'
63+
when: ( awx_https_string in matrix_client_element_welcome_logo ) and ( matrix_client_element_welcome_logo | trim | length > 0 )
6364

6465
- name: Remove Element-Web custom logo locally on AWX if not defined
6566
delegate_to: 127.0.0.1
6667
lineinfile:
6768
path: '{{ awx_cached_matrix_vars }}'
6869
regexp: "^matrix_client_element_welcome_logo: "
6970
state: absent
70-
when: awx_matrix_client_element_welcome_logo | trim | length == 0
71+
when: matrix_client_element_welcome_logo | trim | length == 0
7172

7273
- name: Set Element-Web custom logo link locally on AWX if defined
7374
delegate_to: 127.0.0.1
@@ -78,15 +79,15 @@
7879
insertafter: '# Element Settings Start'
7980
with_dict:
8081
'matrix_client_element_welcome_logo_link': '{{ matrix_client_element_welcome_logo_link }}'
81-
when: ( awx_https_string in awx_matrix_client_element_welcome_logo_link ) and ( awx_matrix_client_element_welcome_logo_link | trim | length > 0 )
82+
when: ( awx_https_string in matrix_client_element_welcome_logo_link ) and ( matrix_client_element_welcome_logo_link | trim | length > 0 )
8283

8384
- name: Remove Element-Web custom logo link locally on AWX if not defined
8485
delegate_to: 127.0.0.1
8586
lineinfile:
8687
path: '{{ awx_cached_matrix_vars }}'
8788
regexp: "^matrix_client_element_welcome_logo_link: "
8889
state: absent
89-
when: awx_matrix_client_element_welcome_logo_link | trim | length == 0
90+
when: matrix_client_element_welcome_logo_link | trim | length == 0
9091

9192
- name: Set Element-Web custom headline locally on AWX if defined
9293
delegate_to: 127.0.0.1

0 commit comments

Comments
 (0)