mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2025-01-15 12:43:12 +01:00
fixed error with element client update task
This commit is contained in:
parent
a6e3203398
commit
f684719b2a
@ -80,7 +80,7 @@
|
|||||||
|
|
||||||
# Update the well-known client file for Element Call (adding RTC FOCI)
|
# Update the well-known client file for Element Call (adding RTC FOCI)
|
||||||
- name: Update the well-known client file for Element Call
|
- name: Update the well-known client file for Element Call
|
||||||
ansible.builtin.include_tasks: update_well_known_client.yml
|
ansible.builtin.include_tasks: "tasks/update_well_known_client.yml"
|
||||||
when: matrix_element_call_enabled | bool
|
when: matrix_element_call_enabled | bool
|
||||||
|
|
||||||
|
|
||||||
@ -98,3 +98,4 @@
|
|||||||
ansible.builtin.include_tasks: "tasks/update_element_web_config.yml"
|
ansible.builtin.include_tasks: "tasks/update_element_web_config.yml"
|
||||||
when: matrix_element_call_enabled | bool
|
when: matrix_element_call_enabled | bool
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,27 +1,38 @@
|
|||||||
- name: Update Element Web config.json settings
|
- name: Load Element Web config.json content
|
||||||
vars:
|
ansible.builtin.slurp:
|
||||||
additional_settings: |
|
src: "{{ element_web_config_path }}"
|
||||||
{
|
register: element_web_config_content_raw
|
||||||
"features": {
|
ignore_errors: no
|
||||||
"feature_video_rooms": true,
|
|
||||||
"feature_new_room_decoration_ui": true,
|
|
||||||
"feature_group_calls": true,
|
|
||||||
"feature_element_call_video_rooms": true
|
|
||||||
},
|
|
||||||
"element_call": {
|
|
||||||
"url": "https://{{ matrix_element_call_domain }}",
|
|
||||||
"participant_limit": 8,
|
|
||||||
"brand": "Element Call",
|
|
||||||
"use_exclusively": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
set_fact:
|
|
||||||
updated_element_web_config: "{{ (element_web_config_content.content | b64decode | from_json) | combine(additional_settings | from_json, recursive=True) }}"
|
|
||||||
|
|
||||||
- name: Write updated Element Web config.json
|
- name: Parse Element Web config.json content
|
||||||
copy:
|
ansible.builtin.set_fact:
|
||||||
content: "{{ updated_element_web_config | to_nice_json }}"
|
element_web_config_content: "{{ element_web_config_content_raw['content'] | b64decode | from_json }}"
|
||||||
|
when: element_web_config_content_raw is defined and element_web_config_content_raw['content'] is defined
|
||||||
|
|
||||||
|
- name: Update Element Web config.json settings
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
element_web_config_content:
|
||||||
|
"{{ element_web_config_content | combine({
|
||||||
|
'features': {
|
||||||
|
'feature_video_rooms': true,
|
||||||
|
'feature_new_room_decoration_ui': true,
|
||||||
|
'feature_group_calls': true,
|
||||||
|
'feature_element_call_video_rooms': true
|
||||||
|
},
|
||||||
|
'element_call': {
|
||||||
|
'url': 'https://{{ matrix_element_call_domain }}',
|
||||||
|
'participant_limit': 8,
|
||||||
|
'brand': 'Element Call',
|
||||||
|
'use_exclusively': true
|
||||||
|
}
|
||||||
|
}, recursive=True) }}"
|
||||||
|
when: element_web_config_content is defined
|
||||||
|
|
||||||
|
- name: Write updated Element Web config.json back to disk
|
||||||
|
ansible.builtin.copy:
|
||||||
|
content: "{{ element_web_config_content | to_nice_json }}"
|
||||||
dest: "{{ element_web_config_path }}"
|
dest: "{{ element_web_config_path }}"
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
owner: "{{ matrix_user_username }}"
|
owner: "{{ matrix_user_username }}"
|
||||||
group: "{{ matrix_user_groupname }}"
|
group: "{{ matrix_user_groupname }}"
|
||||||
|
when: element_web_config_content is defined
|
||||||
|
Loading…
x
Reference in New Issue
Block a user