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:
|
||||
# listen on local network, allow local network access
|
||||
interface: 127.0.0.1
|
||||
interface: ::1
|
||||
{% for address in unbound_listen_addresses %}
|
||||
interface: {{ address }}
|
||||
{% endfor %}
|
||||
access-control: 127.0.0.1 allow
|
||||
access-control: ::1 allow
|
||||
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
---
|
||||
- name: Install unbound
|
||||
apt:
|
||||
pkg:
|
||||
package:
|
||||
- unbound
|
||||
state: 'latest'
|
||||
update_cache: yes
|
||||
cache_valid_time: 43200
|
||||
|
||||
|
||||
- name: Copy unbound configuration snippets
|
||||
copy:
|
||||
src: '{{ item }}'
|
||||
|
@ -17,8 +18,9 @@
|
|||
with_fileglob:
|
||||
- 'files/snippets/*.conf'
|
||||
|
||||
|
||||
- name: Copy main unbound configuration
|
||||
copy:
|
||||
template:
|
||||
src: '{{ lookup("hf", "unbound.conf") }}'
|
||||
dest: '/etc/unbound/unbound.conf'
|
||||
owner: root
|
||||
|
|
Loading…
Reference in a new issue