From c95d181c9a10e21f6e00730a6ca0549cf7dcec82 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Sat, 21 Dec 2024 13:44:09 +0200 Subject: [PATCH] Add `matrix_client_cinny_config_homeserverList` variable --- roles/custom/matrix-client-cinny/defaults/main.yml | 6 +++++- roles/custom/matrix-client-cinny/templates/config.json.j2 | 4 +--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/roles/custom/matrix-client-cinny/defaults/main.yml b/roles/custom/matrix-client-cinny/defaults/main.yml index 2137fed70..b242dee37 100644 --- a/roles/custom/matrix-client-cinny/defaults/main.yml +++ b/roles/custom/matrix-client-cinny/defaults/main.yml @@ -143,9 +143,13 @@ matrix_client_cinny_path_prefix: / # Controls whether the self-check feature should validate SSL certificates. matrix_client_cinny_self_check_validate_certificates: true -# config.json +# Default homeserver URL to use in the `config.json` file. +# See `matrix_client_cinny_config_homeserverList`. matrix_client_cinny_default_hs_url: "" +# Controls the `homeserverList` value in the `config.json` file. +matrix_client_cinny_config_homeserverList: "{{ [matrix_client_cinny_default_hs_url] }}" # noqa var-naming + # Default Cinny configuration template which covers the generic use case. # You can customize it by controlling the various variables inside it. # diff --git a/roles/custom/matrix-client-cinny/templates/config.json.j2 b/roles/custom/matrix-client-cinny/templates/config.json.j2 index 0da710acc..2a5bd1bcf 100644 --- a/roles/custom/matrix-client-cinny/templates/config.json.j2 +++ b/roles/custom/matrix-client-cinny/templates/config.json.j2 @@ -1,6 +1,4 @@ { "defaultHomeserver": 0, - "homeserverList": [ - {{ matrix_client_cinny_default_hs_url | string|to_json }} - ] + "homeserverList": {{ matrix_client_cinny_config_homeserverList | to_json }} }