ansible-collection-famedly-.../roles/synapse/tasks/configure_worker_overrides.yml
Johanna Dorothea Reichmann 1985813915
feat(synapse): add support for deploying workers
Can deploy synapse workers and allow costum amounts of workers for each
type. For documentation on how to use, see `roles/synapse/README.md`.

In a docker deployment, each worker runs in their own docker container
with respective listener configurations. Labels can be declared in
`tasks/configure_workers.yml` for routing of requests.

In systemd deployments, each worker runs in it's own systemd service,
which are marked as being part of the main service, so restarting the
main service will restart all the workers as well.
2020-11-23 08:55:07 +01:00

29 lines
1 KiB
YAML

---
- name: Build homeserver media worker override
set_fact:
matrix_synapse_media_worker_override:
enable_media_repo: False
media_instance_running_background_jobs: "worker_media_1"
when: matrix_synapse_workers_media|int > 0
- name: Register all federation senders to synapse
set_fact:
matrix_synapse_worker_fed_senders: >
{{ matrix_synapse_worker_fed_senders }}
+
["worker_fed_out_{{ item }}"]
loop: "{{ range(1, matrix_synapse_workers_federation_out + 1) | list }}"
- name: Build homeserver federation override
set_fact:
matrix_synapse_fed_sender_override:
send_federation: False
federation_sender_instances: "{{ matrix_synapse_worker_fed_senders }}"
when: matrix_synapse_workers_federation_out|int > 0
- name: Merge federation sender costum config into homeserver config
set_fact:
matrix_synapse_worker_config: "{{ [ matrix_synapse_worker_config, matrix_synapse_fed_sender_override, matrix_synapse_media_worker_override ] | combine(recursive=True) }}"