From a36589925c2b7ecdccd8ecf3b05c1ec9ebfebc70 Mon Sep 17 00:00:00 2001 From: Chris Coley <chris@codingallnight.com> Date: Sun, 17 Jun 2018 01:54:19 -0700 Subject: [PATCH] Updating the reload and restart handlers to check the config files first --- handlers/main.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/handlers/main.yml b/handlers/main.yml index 4904bed..004a153 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -1,10 +1,16 @@ --- - name: reload postfix + command: /usr/sbin/postfix -c /etc/postfix check + notify: ['reload postfix step 2'] +- name: reload postfix step 2 service: name: postfix state: reloaded - name: restart postfix + command: /usr/sbin/postfix -c /etc/postfix check + notify: ['restart postfix step 2'] +- name: restart postfix step 2 service: name: postfix state: restarted -- GitLab