ADD DNSDist(DoH DoT) service
This commit is contained in:
10
roles/unbound/files/resolver.conf
Normal file
10
roles/unbound/files/resolver.conf
Normal file
@@ -0,0 +1,10 @@
|
||||
server:
|
||||
port: 5335
|
||||
interface: 127.0.0.1
|
||||
do-ip4: yes
|
||||
do-ip6: yes
|
||||
access-control: 127.0.0.1/8 allow
|
||||
hide-identity: yes
|
||||
prefetch: yes
|
||||
prefetch-key: yes
|
||||
auto-trust-anchor-file: "/var/lib/unbound/root.key"
|
||||
22
roles/unbound/tasks/main.yml
Normal file
22
roles/unbound/tasks/main.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
|
||||
- name: install unbound DNS server
|
||||
apt:
|
||||
name: unbound
|
||||
state: present
|
||||
|
||||
|
||||
|
||||
- name: Copy Configuration file for unbound
|
||||
ansible.builtin.copy:
|
||||
src: resolver.conf
|
||||
dest: /etc/unbound/unbound.conf
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
|
||||
|
||||
- name: Enable and start unbound service
|
||||
shell: |
|
||||
systemctl enable unbound
|
||||
systemctl restart unbound
|
||||
Reference in New Issue
Block a user