diff --git a/group_vars/all b/group_vars/all index b77d100..61d5c21 100644 --- a/group_vars/all +++ b/group_vars/all @@ -114,3 +114,8 @@ tor: localtime: run_on: trusted + +nameservers: + - 8.8.8.8 # Google + - 205.171.3.25 # Qwest + - 74.82.42.42 # Hurricane Electric diff --git a/roles/unbound/templates/unbound.conf.j2 b/roles/unbound/templates/unbound.conf.j2 index 94e0979..13b0bbc 100644 --- a/roles/unbound/templates/unbound.conf.j2 +++ b/roles/unbound/templates/unbound.conf.j2 @@ -21,9 +21,11 @@ server: private-address: fd00::/8 private-address: fe80::/10 +{% if nameservers %} # Define DNS servers to forward queries to. forward-zone: name: "." - forward-addr: 8.8.8.8 # Google - forward-addr: 205.171.3.25 # Qwest - forward-addr: 74.82.42.42 # Hurricane Electric + {% for nameserver in nameservers %} + forward-addr: {{ nameserver }} + {% endfor %} +{% endif %}