blob: 59522a85525ac44f4738aed67329a0ddf1b6055a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
---
- name: install unbound and nsd
pkgng:
name: "{{ item }}"
state: present
with_items:
- unbound
- nsd
# "root-hints" is the file which contains the listing of primary root
# DNS servers. Unbound does have a listing of root DNS servers in its
# code, but we want to make sure we have the most up to date copy.
# We normally update our copy once every 6 months.
#
# References:
# * Unbound DNS Server Tutorial
# https://calomel.org/unbound_dns.html
#
- name: unbound - fetch root.hints
command: >
fetch -o /usr/local/etc/unbound/root.hints
"https://www.internic.net/domain/named.cache"
- name: unbound - copy configuration
copy:
src: unbound.conf
dest: /usr/local/etc/unbound/unbound.conf
- name: unbound - enable and start service
command: rcenable unbound
- name: setup resolv.conf
copy:
src: resolv.conf
dest: /etc/resolv.conf
|