Allow Synapse worker list to be generated dynamically

This leads to much easier management and potential safety
features (validation). In the future, we could try to avoid port
conflicts as well, but it didn't seem worth the effort to do it now.
Our port ranges seem large enough.

This can also pave the way for a "presets" feature
(similar to `matrix_nginx_proxy_ssl_presets`) which makes it even easier
for people to configure worker counts.
This commit is contained in:
Slavi Pantaleev
2021-02-15 11:25:35 +02:00
parent 43059bb040
commit 85a05f38e8
4 changed files with 147 additions and 18 deletions

View File

@ -12,6 +12,15 @@
- "matrix_synapse_database_password"
- "matrix_synapse_database_database"
- name: Fail if asking for more than 1 instance of single-instance workers
fail:
msg: >-
`{{ item }}` cannot be more than 1. This is a single-instance worker.
when: "vars[item] > 1"
with_items:
- "matrix_synapse_workers_appservice_workers_count"
- "matrix_synapse_workers_pusher_workers_count"
- name: (Deprecation) Catch and report renamed settings
fail:
msg: >-