mirror of
https://github.com/roles-ansible/ansible_role_unbound.git
synced 2024-08-16 13:39:49 +02:00
Implement listen addresses (and ports) for unbound
This commit is contained in:
parent
696171f2b7
commit
8641861a2f
3 changed files with 12 additions and 4 deletions
5
defaults/main.yml
Normal file
5
defaults/main.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
|
||||||
|
unbound_listen_addresses:
|
||||||
|
- '127.0.0.1@53'
|
||||||
|
- '::1@53'
|
|
@ -5,8 +5,9 @@ remote-control:
|
||||||
|
|
||||||
server:
|
server:
|
||||||
# listen on local network, allow local network access
|
# listen on local network, allow local network access
|
||||||
interface: 127.0.0.1
|
{% for address in unbound_listen_addresses %}
|
||||||
interface: ::1
|
interface: {{ address }}
|
||||||
|
{% endfor %}
|
||||||
access-control: 127.0.0.1 allow
|
access-control: 127.0.0.1 allow
|
||||||
access-control: ::1 allow
|
access-control: ::1 allow
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
---
|
---
|
||||||
- name: Install unbound
|
- name: Install unbound
|
||||||
apt:
|
apt:
|
||||||
pkg:
|
package:
|
||||||
- unbound
|
- unbound
|
||||||
state: 'latest'
|
state: 'latest'
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
cache_valid_time: 43200
|
cache_valid_time: 43200
|
||||||
|
|
||||||
|
|
||||||
- name: Copy unbound configuration snippets
|
- name: Copy unbound configuration snippets
|
||||||
copy:
|
copy:
|
||||||
src: '{{ item }}'
|
src: '{{ item }}'
|
||||||
|
@ -17,8 +18,9 @@
|
||||||
with_fileglob:
|
with_fileglob:
|
||||||
- 'files/snippets/*.conf'
|
- 'files/snippets/*.conf'
|
||||||
|
|
||||||
|
|
||||||
- name: Copy main unbound configuration
|
- name: Copy main unbound configuration
|
||||||
copy:
|
template:
|
||||||
src: '{{ lookup("hf", "unbound.conf") }}'
|
src: '{{ lookup("hf", "unbound.conf") }}'
|
||||||
dest: '/etc/unbound/unbound.conf'
|
dest: '/etc/unbound/unbound.conf'
|
||||||
owner: root
|
owner: root
|
||||||
|
|
Loading…
Reference in a new issue