mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2025-01-29 11:24:57 +01:00
fixing issue with element call domain not being expanded when writing the element web config.json.
This commit is contained in:
parent
e18b28136c
commit
fa2a913d39
@ -1,39 +1,40 @@
|
|||||||
---
|
- name: Read Element Web config.json
|
||||||
- name: Load Element Web config.json content
|
|
||||||
ansible.builtin.slurp:
|
ansible.builtin.slurp:
|
||||||
src: "{{ element_web_config_path }}"
|
src: "{{ element_web_config_path }}"
|
||||||
register: element_web_config_content_raw
|
register: element_web_config_content
|
||||||
ignore_errors: false
|
|
||||||
|
|
||||||
- name: Parse Element Web config.json content
|
- name: Load JSON data from config.json
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
element_web_config_content: "{{ element_web_config_content_raw['content'] | b64decode | from_json }}"
|
element_web_config: "{{ element_web_config_content['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
|
- name: Update Element Call configuration in config.json
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
element_web_config_content:
|
updated_element_call_config: >
|
||||||
"{{ element_web_config_content | combine({
|
{{
|
||||||
'features': {
|
{
|
||||||
'feature_video_rooms': true,
|
"element_call": {
|
||||||
'feature_new_room_decoration_ui': true,
|
"url": "https://{{ matrix_element_call_domain }}",
|
||||||
'feature_group_calls': true,
|
"participant_limit": 8,
|
||||||
'feature_element_call_video_rooms': true
|
"brand": "Element Call",
|
||||||
},
|
"use_exclusively": true
|
||||||
'element_call': {
|
},
|
||||||
'url': 'https://{{ matrix_element_call_domain }}',
|
"features": {
|
||||||
'participant_limit': 8,
|
"feature_video_rooms": true,
|
||||||
'brand': 'Element Call',
|
"feature_new_room_decoration_ui": true,
|
||||||
'use_exclusively': true
|
"feature_group_calls": true,
|
||||||
|
"feature_element_call_video_rooms": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, recursive=True) }}"
|
}}
|
||||||
when: element_web_config_content is defined
|
|
||||||
|
|
||||||
- name: Write updated Element Web config.json back to disk
|
- name: Merge updated Element Call configuration with existing config.json
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
element_web_config: "{{ element_web_config | combine(updated_element_call_config, recursive=True) }}"
|
||||||
|
|
||||||
|
- name: Write updated Element Web config.json
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
content: "{{ element_web_config_content | to_nice_json }}"
|
content: "{{ element_web_config | 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