From 1f1eab80c802e166b859b10fba329eeed2f6730a Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Sun, 25 Dec 2016 16:47:14 +0200
Subject: [PATCH] - Validate config during role run (won't restart service with
 a faulty config).

---
 tasks/main.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tasks/main.yml b/tasks/main.yml
index 4ab4e31..25a2eab 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -35,6 +35,7 @@
       owner: root
       group: 0
       mode: 0o0644
+      validate: 'nsd-checkconf {{ nsd_conf }}'
   notify:
       - Restart NSD
 
@@ -48,6 +49,7 @@
       owner: root
       group: 0
       mode: 0o644
+      validate: 'nsd-checkconf {{ nsd_conf }}'
   notify:
       - Restart NSD
 
-- 
GitLab