From f86881ce26275f4374e75899bf51e57317a6ab24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?= Date: Sun, 17 Feb 2019 23:26:08 +0100 Subject: [PATCH] split handlers block into separate handlers --- handlers/main.yml | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/handlers/main.yml b/handlers/main.yml index 713e1ec..27fc776 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -3,17 +3,20 @@ systemd: daemon_reload: yes -- name: "restart matrix-synapse" - block: - - service: - name: "matrix-synapse" - state: restarted - enabled: yes - when: matrix_synapse_supervision_method == "systemd" - - docker_container: - name: synapse - state: restarted - when: matrix_synapse_supervision_method == "docker" +- name: "restart matrix-synapse using systemd" + service: + name: "matrix-synapse" + state: restarted + enabled: yes + when: matrix_synapse_supervision_method == "systemd" + listen: "restart matrix-synapse" + +- name: "restart synapse using docker" + docker_container: + name: synapse + state: restarted + when: matrix_synapse_supervision_method == "docker" + listen: "restart matrix-synapse" - name: restart rsyslog become: yes