mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2025-06-27 03:37:51 +02:00
feat: serve mautrix bridgev2 wellknown file
This commit is contained in:
@ -52,6 +52,10 @@
|
||||
dest: "{{ matrix_static_files_public_well_known_matrix_path }}/support"
|
||||
when: "{{ matrix_static_files_file_matrix_support_enabled }}"
|
||||
|
||||
- content: "{{ matrix_static_files_file_matrix_mautrix_configuration | to_nice_json }}"
|
||||
dest: "{{ matrix_static_files_public_well_known_matrix_path }}/mautrix"
|
||||
when: "{{ matrix_static_files_file_matrix_mautrix_enabled }}"
|
||||
|
||||
# This one will not be deleted if `matrix_static_files_file_index_html_enabled` flips to `false`.
|
||||
# See the comment for `matrix_static_files_file_index_html_enabled` to learn why.
|
||||
- content: "{{ matrix_static_files_file_index_html_template }}"
|
||||
@ -70,6 +74,12 @@
|
||||
state: absent
|
||||
when: "not matrix_static_files_file_matrix_support_enabled | bool"
|
||||
|
||||
- name: Ensure /.well-known/matrix/mautrix file deleted if not enabled
|
||||
ansible.builtin.file:
|
||||
path: "{{ matrix_static_files_public_well_known_matrix_path }}/mautrix"
|
||||
state: absent
|
||||
when: "not matrix_static_files_file_matrix_mautrix_enabled | bool"
|
||||
|
||||
- name: Ensure matrix-static-files container image is pulled
|
||||
community.docker.docker_image:
|
||||
name: "{{ matrix_static_files_container_image }}"
|
||||
|
@ -24,6 +24,21 @@
|
||||
ansible.builtin.set_fact:
|
||||
well_known_file_checks: "{{ well_known_file_checks + [well_known_file_check_matrix_server] }}"
|
||||
|
||||
- when: matrix_static_files_file_matrix_mautrix_enabled | bool
|
||||
block:
|
||||
- name: Prepare /.well-known/matrix/mautrix to well-known files to check, if enabled
|
||||
ansible.builtin.set_fact:
|
||||
well_known_file_check_matrix_mautrix:
|
||||
path: /.well-known/matrix/mautrix
|
||||
purpose: Mautrix bridge discovery
|
||||
cors: true
|
||||
follow_redirects: safe
|
||||
validate_certs: "{{ matrix_static_files_self_check_validate_certificates }}"
|
||||
|
||||
- name: Inject /.well-known/matrix/mautrix to well-known files to check, if enabled
|
||||
ansible.builtin.set_fact:
|
||||
well_known_file_checks: "{{ well_known_file_checks + [well_known_file_check_matrix_mautrix] }}"
|
||||
|
||||
- name: Perform well-known checks
|
||||
ansible.builtin.include_tasks: "{{ role_path }}/tasks/self_check_well_known_file.yml"
|
||||
with_items: "{{ well_known_file_checks }}"
|
||||
|
Reference in New Issue
Block a user