aboutsummaryrefslogtreecommitdiffstats
path: root/roles/dns/tasks
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2018-02-24 17:49:06 +0800
committerAaron LI <aly@aaronly.me>2018-03-14 11:28:44 +0800
commit5fcd532b648824d947ec009d8d63508b9d3be7fa (patch)
treec12f3cc6dcd16eaef2ead40b630bf95efcc98bc5 /roles/dns/tasks
parent30724d5f9f13530d7d81a51e6b040970bab49c00 (diff)
downloadansible-dfly-vps-5fcd532b648824d947ec009d8d63508b9d3be7fa.tar.bz2
dns/unbound: update config and enable remote-control
Diffstat (limited to 'roles/dns/tasks')
-rw-r--r--roles/dns/tasks/main.yml12
1 files changed, 12 insertions, 0 deletions
diff --git a/roles/dns/tasks/main.yml b/roles/dns/tasks/main.yml
index 04c45f3..d6bfb2f 100644
--- a/roles/dns/tasks/main.yml
+++ b/roles/dns/tasks/main.yml
@@ -22,6 +22,15 @@
"https://www.internic.net/domain/named.cache"
notify: reload-unbound
+- name: unbound - check existence of control key/cert
+ stat:
+ path: /usr/local/etc/unbound/unbound_control.key
+ register: stat_result
+
+- name: unbound - generate self-signed key/cert for control
+ command: unbound-control-setup
+ when: stat_result.stat.exists == False
+
- name: unbound - copy configuration
copy:
src: unbound.conf
@@ -36,6 +45,9 @@
src: resolv.conf
dest: /etc/resolv.conf
+#
+# NSD
+#
- name: NSD - copy configuration
template:
src: nsd.conf.j2