From ed718bcd0ce8cec45104d27780b371560aae8429 Mon Sep 17 00:00:00 2001
From: Aaron LI <aly@aaronly.me>
Date: Sat, 21 Sep 2019 08:57:35 +0800
Subject: dns: Fetch initial anchor for unbound

---
 roles/dns/tasks/main.yml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/roles/dns/tasks/main.yml b/roles/dns/tasks/main.yml
index e384929..b72b548 100644
--- a/roles/dns/tasks/main.yml
+++ b/roles/dns/tasks/main.yml
@@ -30,6 +30,12 @@
   command: unbound-control-setup
   when: not stat_result.stat.exists
 
+- name: unbound - fetch initial anchor
+  command: >
+    unbound-anchor -a /usr/local/etc/unbound/root.key
+    -r /usr/local/etc/unbound/root.hints
+  ignore_errors: true
+
 - name: unbound - copy configuration
   copy:
     src: unbound.conf
-- 
cgit v1.2.2