aboutsummaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2018-02-24 16:55:04 +0800
committerAaron LI <aly@aaronly.me>2018-03-14 11:28:44 +0800
commit30724d5f9f13530d7d81a51e6b040970bab49c00 (patch)
tree088857c66f3acc49f23a206934420b13b55a3a52 /roles
parentcc494d798101e59b6d43e0e8f68aacee8483c20d (diff)
downloadansible-dfly-vps-30724d5f9f13530d7d81a51e6b040970bab49c00.tar.bz2
dns: reload unbound/nsd instead of restart
Diffstat (limited to 'roles')
-rw-r--r--roles/dns/handlers/main.yml6
-rw-r--r--roles/dns/tasks/main.yml8
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