From 7793d60938f267a9726672635d4ad6461913cca4 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Fri, 11 Dec 2015 16:43:53 +0100 Subject: [PATCH] library/roles/haproxy: reload rsyslog after having installed haproxy. A new rsyslog directive is installed and a reload is needed to activate it. --- haproxy/handlers/main.yml | 4 ++++ haproxy/tasks/main.yml | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/haproxy/handlers/main.yml b/haproxy/handlers/main.yml index 59bf4330..a3cb82bd 100644 --- a/haproxy/handlers/main.yml +++ b/haproxy/handlers/main.yml @@ -7,3 +7,7 @@ service: name=haproxy state=reloaded when: haproxy_enabled +- name: Reload rsyslog + service: name=rsyslog state=reloaded + when: haproxy_enabled + diff --git a/haproxy/tasks/main.yml b/haproxy/tasks/main.yml index 915a767a..10650d20 100644 --- a/haproxy/tasks/main.yml +++ b/haproxy/tasks/main.yml @@ -36,6 +36,11 @@ ignore_errors: True tags: haproxy +- name: Haproxy puts a new rsyslog directive. Reload rsyslog to activate it + service: name=rsyslog state=reloaded + when: haproxy_enabled + tags: haproxy + - name: Ensure that haproxy is stopped and disabled if needed service: name=haproxy state=stopped enabled=no when: not haproxy_enabled