ansible-collection-famedly-.../roles/synapse/handlers/main.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

27 lines
660 B
YAML

---
- name: "reload systemd"
systemd:
daemon_reload: yes
- name: "restart matrix-synapse using systemd"
service:
name: matrix-synapse.service
state: restarted
enabled: yes
when: matrix_synapse_supervision_method == "systemd"
listen: "restart matrix-synapse"
- name: "restart synapse using docker"
docker_container:
name: "{{ matrix_synapse_container_name }}"
state: started
restart: yes
when: matrix_synapse_supervision_method == "docker"
listen: "restart matrix-synapse"
- name: restart rsyslog
become: yes
service:
name: rsyslog
state: restarted
when: matrix_synapse_supervision_method == "systemd"