ansible-debops-infrastructure

DebOps and Ansible scripts to manage my infrastructure
git clone git://git.erethon.com/ansible-debops-infrastructure
Log | Files | Refs

commit 803a38385e7e9277af64aae33a960f18797e59f5
parent 5cf2d7e468ddc66d30dd14a6aaef7df0c5e4ac85
Author: Dionysis Grigoropoulos <dgrig@erethon.com>
Date:   Tue, 22 Feb 2022 12:59:13 +0200

synapse: Add config option to set cache factors

Diffstat:
ansible/inventory/host_vars/productionmatrix/synapse.yml | 2++
ansible/roles/synapse/templates/homeserver.yaml.j2 | 6++++++
2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/ansible/inventory/host_vars/productionmatrix/synapse.yml b/ansible/inventory/host_vars/productionmatrix/synapse.yml @@ -14,3 +14,5 @@ synapse__max_upload_size: '35M' synapse__admin_auth_token: '{{ lookup("password", secret + "/credentials/productionmatrix/synapse/admin_auth_token") }}' synapse__public_base_url: 'https://matrix.erethon.com' + +synapse__cache_factors: ['get_users_in_room: 4.0', '_get_joined_profile_from_event_id: 8.0'] diff --git a/ansible/roles/synapse/templates/homeserver.yaml.j2 b/ansible/roles/synapse/templates/homeserver.yaml.j2 @@ -64,5 +64,11 @@ public_baseurl: "{{ synapse__public_base_url }}" caches: expiry_time: "{{ synapse__caches_expiry_time }}" + {% if synapse__cache_factors is defined %} +per_cache_factors: + {% for cache_factor in synapse__cache_factors %} + {{ cache_factor }} + {% endfor %} + {% endif %} report_stats: "{{ synapse__enable_phonehome_stats }}"