From b2b62b722154c921bfb114a5dffc999149725d9c Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Mon, 1 Nov 2021 17:51:05 +0200 Subject: [PATCH] Add a variable to control Dendrite's disable_federation setting --- roles/matrix-dendrite/defaults/main.yml | 4 ++++ roles/matrix-dendrite/templates/dendrite/dendrite.yaml.j2 | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/roles/matrix-dendrite/defaults/main.yml b/roles/matrix-dendrite/defaults/main.yml index e8e307edb..61e5f7100 100644 --- a/roles/matrix-dendrite/defaults/main.yml +++ b/roles/matrix-dendrite/defaults/main.yml @@ -114,6 +114,10 @@ matrix_dendrite_trusted_id_servers: - "matrix.org" - "vector.im" +# Controls whether Dendrite will federate at all. +# Disable this to completely isolate your server from the rest of the Matrix network. +matrix_dendrite_disable_federation: false + # Default Dendrite configuration template which covers the generic use case. # You can customize it by controlling the various variables inside it. # diff --git a/roles/matrix-dendrite/templates/dendrite/dendrite.yaml.j2 b/roles/matrix-dendrite/templates/dendrite/dendrite.yaml.j2 index f5744dd5b..2559be15a 100644 --- a/roles/matrix-dendrite/templates/dendrite/dendrite.yaml.j2 +++ b/roles/matrix-dendrite/templates/dendrite/dendrite.yaml.j2 @@ -64,7 +64,7 @@ global: # Disables federation. Dendrite will not be able to make any outbound HTTP requests # to other servers and the federation API will not be exposed. - disable_federation: false + disable_federation: {{ matrix_dendrite_disable_federation|to_json }} # Configuration for Kafka/Naffka. kafka: