From 6538ccda297ac5a4862bdc5d842699d771f82d77 Mon Sep 17 00:00:00 2001 From: Baptiste Jonglez Date: Sun, 27 Mar 2016 17:57:36 +0200 Subject: [PATCH] NSD: Reload database after having rebuilt it Also don't restart nsd when changing zone configuration, rebuild + reload is enough. --- handlers/main.yml | 3 +++ tasks/main.yml | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/handlers/main.yml b/handlers/main.yml index a0f07fb..399f476 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -7,6 +7,9 @@ - name: rebuild nsd3 database command: /usr/sbin/nsdc rebuild +- name: reload nsd3 database + command: /usr/sbin/nsdc reload + - name: restart nsd3 service: name=nsd3 state=restarted diff --git a/tasks/main.yml b/tasks/main.yml index 36d0ba3..d890ebb 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -20,7 +20,7 @@ template: src=zones_config.j2 dest={{ zones_config_file }} owner=root group=root mode=0644 notify: - rebuild nsd3 database - - restart nsd3 + - reload nsd3 database - name: Copy content of primary nsd3 zones @@ -28,4 +28,5 @@ with_items: "{{ nsd_primary_zones }}" notify: - rebuild nsd3 database + - reload nsd3 database - notify slaves