aboutsummaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2019-09-21 08:56:52 +0800
committerAaron LI <aly@aaronly.me>2019-09-21 08:56:52 +0800
commitbdbd09ed8affb0a59849bc62bf5d30d0348e2856 (patch)
tree0dd806a9d62ba9dc0ed11b637846e4b1a1218359 /roles
parentcaf8ed1ae70847db939700f81bb8288217f9e32b (diff)
downloadansible-dfly-vps-bdbd09ed8affb0a59849bc62bf5d30d0348e2856.tar.bz2
dns: Use "service" module instead of rcrestart/rcreload
Diffstat (limited to 'roles')
-rw-r--r--roles/dns/handlers/main.yml16
1 files changed, 12 insertions, 4 deletions
diff --git a/roles/dns/handlers/main.yml b/roles/dns/handlers/main.yml
index 196bbea..f9383c7 100644
--- a/roles/dns/handlers/main.yml
+++ b/roles/dns/handlers/main.yml
@@ -1,12 +1,20 @@
---
- name: restart-unbound
- command: rcrestart unbound
+ service:
+ name: unbound
+ state: restarted
- name: reload-unbound
- command: rcreload unbound
+ service:
+ name: unbound
+ state: reloaded
- name: restart-nsd
- command: rcrestart nsd
+ service:
+ name: nsd
+ state: restarted
- name: reload-nsd
- command: rcreload nsd
+ service:
+ name: nsd
+ state: reloaded