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