|
- ---
- - name: Read the existing well-known client file
- ansible.builtin.slurp:
- path: "{{ matrix_base_data_path }}/static-files/public/.well-known/matrix/client"
- register: client_file_content
-
- - name: Load the existing JSON content
- ansible.builtin.set_fact:
- client_json: "{{ client_file_content['content'] | b64decode | from_json }}"
-
- - name: Update the existing well-known client file for Element Call (RTC FOCI)
- ansible.builtin.set_fact:
- updated_client_json: "{{ client_json | combine({'org.matrix.msc4143.rtc_foci': [{'type': 'livekit', 'livekit_service_url': matrix_jwt_service_url}]}, recursive=True) }}"
-
- - name: Write the updated well-known client file
- ansible.builtin.copy:
- content: "{{ updated_client_json | to_nice_json }}"
- dest: "{{ matrix_base_data_path }}/static-files/public/.well-known/matrix/client"
- mode: '0644'
- owner: "{{ matrix_user_username }}"
- group: "{{ matrix_user_groupname }}"
|