|
13 | 13 | 'matrix_client_element_default_theme': '{{ matrix_client_element_default_theme }}' |
14 | 14 | 'matrix_client_element_registration_enabled': '{{ matrix_client_element_registration_enabled }}' |
15 | 15 |
|
| 16 | +- name: Record Synapse Custom variables locally on AWX |
| 17 | + delegate_to: 127.0.0.1 |
| 18 | + lineinfile: |
| 19 | + path: '{{ awx_cached_matrix_vars }}' |
| 20 | + regexp: "^#? *{{ item.key | regex_escape() }}:" |
| 21 | + line: "{{ item.key }}: '{{ item.value }}'" |
| 22 | + insertbefore: '# Element Settings End' |
| 23 | + 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 }}' |
| 28 | + 'awx_matrix_client_element_welcome_headline': '{{ awx_matrix_client_element_welcome_headline }}' |
| 29 | + 'awx_matrix_client_element_welcome_text': '{{ awx_matrix_client_element_welcome_text }}' |
| 30 | + |
16 | 31 | - name: Set custom branding locally on AWX |
17 | 32 | delegate_to: 127.0.0.1 |
18 | 33 | lineinfile: |
|
21 | 36 | line: "{{ item.key }}: '{{ item.value }}'" |
22 | 37 | insertafter: '# Element Settings Start' |
23 | 38 | with_dict: |
24 | | - 'matrix_client_element_brand': "{{ matrix_client_element_brand }}" |
| 39 | + 'matrix_client_element_brand': "{{ awx_matrix_client_element_brand }}" |
25 | 40 |
|
26 | 41 | - name: Remove custom branding locally on AWX if not defined |
27 | 42 | delegate_to: 127.0.0.1 |
28 | 43 | lineinfile: |
29 | 44 | path: '{{ awx_cached_matrix_vars }}' |
30 | 45 | regexp: "^matrix_client_element_brand: " |
31 | 46 | state: absent |
32 | | - when: matrix_client_element_brand | trim | length == 0 |
| 47 | + when: awx_matrix_client_element_brand | trim | length == 0 |
33 | 48 |
|
34 | 49 | - name: Set fact for 'https' string |
35 | 50 | set_fact: |
|
43 | 58 | line: "{{ item.key }}: '{{ item.value }}'" |
44 | 59 | insertafter: '# Element Settings Start' |
45 | 60 | with_dict: |
46 | | - 'matrix_client_element_welcome_logo': '{{ matrix_client_element_welcome_logo }}' |
47 | | - when: ( awx_https_string in matrix_client_element_welcome_logo ) and ( matrix_client_element_welcome_logo | trim | length > 0 ) |
| 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 ) |
48 | 63 |
|
49 | 64 | - name: Remove custom logo locally on AWX if not defined |
50 | 65 | delegate_to: 127.0.0.1 |
51 | 66 | lineinfile: |
52 | 67 | path: '{{ awx_cached_matrix_vars }}' |
53 | 68 | regexp: "^matrix_client_element_welcome_logo: " |
54 | 69 | state: absent |
55 | | - when: matrix_client_element_welcome_logo | trim | length == 0 |
| 70 | + when: awx_matrix_client_element_welcome_logo | trim | length == 0 |
56 | 71 |
|
57 | 72 | - name: Set custom logo link locally on AWX if defined |
58 | 73 | delegate_to: 127.0.0.1 |
|
63 | 78 | insertafter: '# Element Settings Start' |
64 | 79 | with_dict: |
65 | 80 | 'matrix_client_element_welcome_logo_link': '{{ matrix_client_element_welcome_logo_link }}' |
66 | | - when: ( awx_https_string in matrix_client_element_welcome_logo_link ) and ( matrix_client_element_welcome_logo_link | trim | length > 0 ) |
| 81 | + when: ( awx_https_string in awx_matrix_client_element_welcome_logo_link ) and ( awx_matrix_client_element_welcome_logo_link | trim | length > 0 ) |
67 | 82 |
|
68 | 83 | - name: Remove custom logo link locally on AWX if not defined |
69 | 84 | delegate_to: 127.0.0.1 |
70 | 85 | lineinfile: |
71 | 86 | path: '{{ awx_cached_matrix_vars }}' |
72 | 87 | regexp: "^matrix_client_element_welcome_logo_link: " |
73 | 88 | state: absent |
74 | | - when: matrix_client_element_welcome_logo_link | trim | length == 0 |
| 89 | + when: awx_matrix_client_element_welcome_logo_link | trim | length == 0 |
75 | 90 |
|
76 | 91 | - name: Set custom headline locally on AWX if defined |
77 | 92 | delegate_to: 127.0.0.1 |
|
81 | 96 | line: "{{ item.key }}: '{{ item.value }}'" |
82 | 97 | insertafter: '# Element Settings Start' |
83 | 98 | with_dict: |
84 | | - 'matrix_client_element_welcome_headline': '{{ matrix_client_element_welcome_headline }}' |
85 | | - when: matrix_client_element_welcome_headline | trim | length > 0 |
| 99 | + 'matrix_client_element_welcome_headline': '{{ awx_matrix_client_element_welcome_headline }}' |
| 100 | + when: awx_matrix_client_element_welcome_headline | trim | length > 0 |
86 | 101 |
|
87 | 102 | - name: Remove custom headline locally on AWX if not defined |
88 | 103 | delegate_to: 127.0.0.1 |
89 | 104 | lineinfile: |
90 | 105 | path: '{{ awx_cached_matrix_vars }}' |
91 | 106 | regexp: "^matrix_client_element_welcome_headline: " |
92 | 107 | state: absent |
93 | | - when: matrix_client_element_welcome_headline | trim | length == 0 |
| 108 | + when: awx_matrix_client_element_welcome_headline | trim | length == 0 |
94 | 109 |
|
95 | 110 | - name: Set custom text locally on AWX if defined |
96 | 111 | delegate_to: 127.0.0.1 |
|
100 | 115 | line: "{{ item.key }}: '{{ item.value }}'" |
101 | 116 | insertafter: '# Element Settings Start' |
102 | 117 | with_dict: |
103 | | - 'matrix_client_element_welcome_text': '{{ matrix_client_element_welcome_text }}' |
104 | | - when: matrix_client_element_welcome_text | trim | length > 0 |
| 118 | + 'matrix_client_element_welcome_text': '{{ awx_matrix_client_element_welcome_text }}' |
| 119 | + when: awx_matrix_client_element_welcome_text | trim | length > 0 |
105 | 120 |
|
106 | 121 | - name: Remove custom text locally on AWX if not defined |
107 | 122 | delegate_to: 127.0.0.1 |
108 | 123 | lineinfile: |
109 | 124 | path: '{{ awx_cached_matrix_vars }}' |
110 | 125 | regexp: "^matrix_client_element_welcome_text: " |
111 | 126 | state: absent |
112 | | - when: matrix_client_element_welcome_text | trim | length == 0 |
| 127 | + when: awx_matrix_client_element_welcome_text | trim | length == 0 |
113 | 128 |
|
114 | 129 | - name: Set element-web background locally on AWX if defined |
115 | 130 | delegate_to: 127.0.0.1 |
|
119 | 134 | line: "{{ item.key }}: '{{ item.value }}'" |
120 | 135 | insertafter: '# Element Settings Start' |
121 | 136 | with_dict: |
122 | | - 'matrix_client_element_branding_welcomeBackgroundUrl': '{{ matrix_client_element_branding_welcomeBackgroundUrl }}' |
123 | | - when: matrix_client_element_branding_welcomeBackgroundUrl | trim | length > 0 |
| 137 | + 'matrix_client_element_branding_welcomeBackgroundUrl': '{{ awx_matrix_client_element_branding_welcomeBackgroundUrl }}' |
| 138 | + when: awx_matrix_client_element_branding_welcomeBackgroundUrl | trim | length > 0 |
124 | 139 |
|
125 | 140 | - name: Remove element-web background locally on AWX if not defined |
126 | 141 | delegate_to: 127.0.0.1 |
127 | 142 | lineinfile: |
128 | 143 | path: '{{ awx_cached_matrix_vars }}' |
129 | 144 | regexp: "^matrix_client_element_branding_welcomeBackgroundUrl: " |
130 | 145 | state: absent |
131 | | - when: matrix_client_element_branding_welcomeBackgroundUrl | trim | length == 0 |
| 146 | + when: awx_matrix_client_element_branding_welcomeBackgroundUrl | trim | length == 0 |
132 | 147 |
|
133 | 148 | - name: Save new 'Configure Element' survey.json to the AWX tower, template |
134 | 149 | delegate_to: 127.0.0.1 |
|
0 commit comments