Skip to content

Commit a6c9d50

Browse files
committed
fix some issues with unbound
1 parent bc7a033 commit a6c9d50

File tree

5 files changed

+10
-27
lines changed

5 files changed

+10
-27
lines changed

roles/base/tasks/apt-packages.yml

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
- tmux
2121
- tree
2222
- ufw
23-
- unbound
2423
- vim
2524
- xclip
2625
loop_control:

roles/unbound/tasks/dynamic.yml

+1-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
11
---
2-
# - name: Set _unbound user as owner for /var/unbound/etc folder
3-
# file:
4-
# path: /var/unbound/etc
5-
# owner: _unbound
6-
# group: "wheel"
7-
# mode: "0755"
8-
92
- name: deploy unbound.conf template configuration file
103
template:
114
src: unbound.conf.j2
12-
dest: "/etc/unbound/"
5+
dest: "/etc/unbound/unbound.conf.d/unbound.conf"
136
mode: "0644"
147
owner: "root"
158
group: "root"

roles/unbound/templates/unbound.conf.j2

+1-14
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,4 @@
11
# /etc/unbound/unbound.conf
2-
#
3-
# Unbound configuration file for Debian.
4-
#
5-
# See the unbound.conf(5) man page.
6-
#
7-
# See /usr/share/doc/unbound/examples/unbound.conf for a commented
8-
# reference config file.
9-
#
10-
# The following line includes additional configuration files from the
11-
# /etc/unbound/unbound.conf.d directory.
12-
include-toplevel: "/etc/unbound/unbound.conf.d/*.conf"
13-
14-
152

163
server:
174
verbosity: 1
@@ -27,7 +14,7 @@ server:
2714
do-udp: yes
2815
do-tcp: yes
2916
directory: "/etc/unbound"
30-
#chroot: "/var/unbound"
17+
#chroot: "/etc/unbound"
3118
interface: {{ host_ip }}
3219
interface: 127.0.0.1
3320

roles/unbound/vars/main.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# replace network interface as required.
22
# within vim - :3,5s/re0/em0/g OR :3,5s/em0/re0/g
3-
host_ip: "{{ ansible_em0['ipv4'][0].address }}"
4-
network_addr: "{{ ansible_em0['ipv4'][0].network }}"
5-
subnet_mask: "{{ ansible_em0['ipv4'][0].netmask }}"
3+
host_ip: "{{ ansible_default_ipv4['address'] }}"
4+
network_addr: "{{ ansible_default_ipv4['network'] }}"
5+
subnet_mask: "{{ ansible_default_ipv4['netmask'] }}"

test.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@
3939

4040
- name: ansible_default_ipv4[address]
4141
debug:
42-
msg: "{{ ansible_default_ipv4['address'] }}"
42+
msg: |
43+
Primary Interface: {{ ansible_default_ipv4.interface }}
44+
IP Address: {{ ansible_default_ipv4.address }}
45+
Subnet: {{ ansible_default_ipv4.network }}
46+
Netmask: {{ ansible_default_ipv4.netmask }}
4347
4448
- name: ansible_env['USER']
4549
debug:

0 commit comments

Comments
 (0)