From 2717edfe1c7eab791a9b8e099df33482333ce29c Mon Sep 17 00:00:00 2001 From: Daniel Miranda Date: Fri, 25 Nov 2016 17:42:30 -0200 Subject: [PATCH] Restart services when init scripts/services change --- tasks/sentinel.yml | 3 +++ tasks/server.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/tasks/sentinel.yml b/tasks/sentinel.yml index ec5e6645..bc7eaeb3 100644 --- a/tasks/sentinel.yml +++ b/tasks/sentinel.yml @@ -20,6 +20,7 @@ paths: - ../templates when: redis_as_service and ansible_service_mgr|default() != 'systemd' + notify: restart sentinel - name: create sentinel systemd service template: @@ -33,6 +34,8 @@ paths: - ../templates when: redis_as_service and ansible_service_mgr|default() == 'systemd' + notify: restart sentinel + - name: set sentinel to start at boot service: diff --git a/tasks/server.yml b/tasks/server.yml index 54067244..67c300c3 100644 --- a/tasks/server.yml +++ b/tasks/server.yml @@ -20,6 +20,7 @@ paths: - ../templates when: redis_as_service and ansible_service_mgr | default != 'systemd' + notify: restart redis - name: create redis systemd service template: @@ -33,6 +34,7 @@ paths: - ../templates when: redis_as_service and ansible_service_mgr | default == 'systemd' + notify: restart redis - name: set redis to start at boot service: