Enable location sharing in Element (#2276)

* Enable location sharing in Element

* Update roles/custom/matrix-client-element/tasks/validate_config.yml

Co-authored-by: Slavi Pantaleev <slavi@devture.com>

* Update roles/custom/matrix-client-element/tasks/setup_install.yml

Co-authored-by: Slavi Pantaleev <slavi@devture.com>

* Rename location sharing vars to be consistent with other vars

* Rename style.json to map_style.json

* Add m.tile_server section to /.well-known/matrix/client

Co-authored-by: Slavi Pantaleev <slavi@devture.com>
This commit is contained in:
NullIsNot0
2022-11-18 15:07:53 +02:00
committed by GitHub
parent 84c74136ea
commit 77451c6a71
7 changed files with 113 additions and 0 deletions

View File

@ -69,6 +69,15 @@
owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_groupname }}"
- name: Ensure Element location sharing map style installed
when: matrix_client_element_location_sharing_enabled | bool
ansible.builtin.copy:
content: "{{ matrix_client_element_location_sharing_map_style | to_nice_json }}"
dest: "{{ matrix_client_element_data_path }}/map_style.json"
mode: 0644
owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_groupname }}"
- name: Ensure Element config files installed
ansible.builtin.template:
src: "{{ item.src }}"

View File

@ -8,6 +8,14 @@
with_items:
- "matrix_client_element_default_hs_url"
- name: Fail if Element location sharing enabled, but no tile server defined
ansible.builtin.fail:
msg: >-
You need to define at least one map tile server in matrix_client_element_location_sharing_map_style_content_sources_localsource_tiles list
when:
- matrix_client_element_location_sharing_enabled | bool
- matrix_client_element_location_sharing_map_style_content_sources_localsource_tiles | length == 0
- name: (Deprecation) Catch and report riot-web variables
ansible.builtin.fail:
msg: >-