From 30724d5f9f13530d7d81a51e6b040970bab49c00 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Sat, 24 Feb 2018 16:55:04 +0800 Subject: dns: reload unbound/nsd instead of restart --- roles/dns/handlers/main.yml | 6 ++++++ roles/dns/tasks/main.yml | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/roles/dns/handlers/main.yml b/roles/dns/handlers/main.yml index aab63c8..196bbea 100644 --- a/roles/dns/handlers/main.yml +++ b/roles/dns/handlers/main.yml @@ -2,5 +2,11 @@ - name: restart-unbound command: rcrestart unbound +- name: reload-unbound + command: rcreload unbound + - name: restart-nsd command: rcrestart nsd + +- name: reload-nsd + command: rcreload nsd diff --git a/roles/dns/tasks/main.yml b/roles/dns/tasks/main.yml index 6712c37..04c45f3 100644 --- a/roles/dns/tasks/main.yml +++ b/roles/dns/tasks/main.yml @@ -20,13 +20,13 @@ command: > fetch -o /usr/local/etc/unbound/root.hints "https://www.internic.net/domain/named.cache" - notify: restart-unbound + notify: reload-unbound - name: unbound - copy configuration copy: src: unbound.conf dest: /usr/local/etc/unbound/unbound.conf - notify: restart-unbound + notify: reload-unbound - name: unbound - enable and start service command: rcenable unbound @@ -40,7 +40,7 @@ template: src: nsd.conf.j2 dest: /usr/local/etc/nsd/nsd.conf - notify: restart-nsd + notify: reload-nsd - name: NSD - check existence of control key/cert stat: @@ -61,7 +61,7 @@ src: "zones/{{ item }}.zone.j2" dest: "/usr/local/etc/nsd/zones/{{ item }}.zone" with_items: "{{ nsd.zones }}" - notify: restart-nsd + notify: reload-nsd - name: NSD - enable and start service command: rcenable nsd -- cgit v1.2.2