Private
Public Access
2
0
This commit is contained in:
2026-01-20 17:40:16 +03:00
parent cda556eec6
commit b78da80550
83 changed files with 108 additions and 82 deletions

View File

@@ -0,0 +1,14 @@
unbound_listen_interfaces:
- "0.0.0.0"
unbound_access_control:
- "0.0.0.0/0 allow"
unbound_forward_zones:
- name: "."
forward_to: "8.8.8.8"
unbound_stub_zones: []
# - name: <string>
# stub_to: <string>
# no_cache: no (default yes)

View File

@@ -0,0 +1,4 @@
- name: Restart unbound
ansible.builtin.service:
name: "unbound"
state: "restarted"

View File

@@ -0,0 +1,14 @@
- name: Install Unbound
ansible.builtin.apt:
name:
- "unbound"
notify:
- "Restart unbound"
- name: Deploy unbounf config file
ansible.builtin.template:
src: "templates/unbound.conf"
dest: "/etc/unbound/unbound.conf.d/unbound.conf"
mode: "0644"
notify:
- "Restart unbound"

View File

@@ -0,0 +1,21 @@
server:
do-not-query-localhost: no
{% for interface in unbound_listen_interfaces %}
interface: {{ interface }}
{% endfor %}
{% for access in unbound_access_control %}
access-control: {{ access }}
{% endfor %}
{% for zone in unbound_stub_zones %}
stub-zone:
name: "{{ zone.name }}"
stub-addr: {{ zone.stub_to }}
stub-no-cache: {{ zone.no_cache | default('yes') }}
{% endfor %}
{% for zone in unbound_forward_zones %}
forward-zone:
name: "{{ zone.name }}"
forward-addr: {{ zone.forward_to }}
{% endfor %}