Skip to content

Commit

Permalink
Merge pull request #6 from froscon/master
Browse files Browse the repository at this point in the history
Fix some deprecation warnings
  • Loading branch information
jdauphant authored Apr 15, 2018
2 parents f1c247f + 0e1c0a1 commit d2ebfc3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ unbound_forward_zone:
## Generate entries and reverse from the inventory (need ansible_ssh_host set on all host)
```
# Listen interface
unbound_interfaces:
unbound_interfaces:
- 127.0.0.1
- 192.168.0.10
Expand Down Expand Up @@ -58,7 +58,7 @@ unbound_forward_zone:
## More complete example (need ansible_ssh_host set on all host)
```
# Listen interface
unbound_interfaces:
unbound_interfaces:
- 127.0.0.1
- 192.168.0.10
Expand Down
8 changes: 4 additions & 4 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ unbound_configuration:
unbound_zone_name: "default"
unbound_only_zones: false

unbound_interfaces:
unbound_interfaces:
- 127.0.0.1

unbound_access_control:
Expand All @@ -23,7 +23,7 @@ unbound_private_address:
- 10.0.0.0/8
- 172.16.0.0/12
- 192.168.0.0/16
- 169.254.0.0/16
- 169.254.0.0/16
- "fd00::/8"
- "fe80::/10"

Expand All @@ -40,7 +40,7 @@ unbound_default_local_zone: "static"

unbound_inventory_domain_with_reverse: true

unbound_zones:
unbound_zones:
- name: "default"

unbound_forward_zone_active : true
Expand All @@ -49,7 +49,7 @@ unbound_forward_zone:
- 8.8.4.4 #Google DNS 2

# Package states: installed or latest
unbound_pkg_state: installed
unbound_pkg_state: present

# Service states: started or stopped
unbound_service_state: started
Expand Down
12 changes: 6 additions & 6 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@
tags: ["configuration","unbound"]

- name: configure add independant config file
template:
template:
src={{item}}.j2
dest="/etc/unbound/conf.d/{{item}}"
with_items:
with_items:
- 01general.conf
- 99forward_zone.conf
notify: restart unbound
when: unbound_only_zones == false
tags: ["configuration","unbound"]

- name: configure unbound zones
template:
template:
src=10zone.conf.j2
dest="/etc/unbound/conf.d/10{{item.name}}.conf"
with_items: "{{unbound_zones}}"
Expand All @@ -41,19 +41,19 @@
- name: retreive unbound conf file list
shell: /bin/ls /etc/unbound/conf.d/
register: unbound_conf_list
always_run: true
check_mode: no
tags: ["configuration","unbound"]

- name: configure unbound.conf to include all configuration
template:
template:
src=unbound.conf.j2
dest=/etc/unbound/unbound.conf
validate="/usr/sbin/unbound-checkconf %s"
notify: restart unbound
tags: ["configuration","unbound"]

- name: ensure unbound is started/stopped
service:
service:
name=unbound
state={{ unbound_service_state }}
enabled={{ unbound_service_enabled }}
Expand Down
2 changes: 1 addition & 1 deletion templates/99forward_zone.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
name: "."
{% for forward_addr in unbound_forward_zone %}
forward-addr: {{forward_addr}}
{% endfor %}
{% endfor %}
{% endif %}

0 comments on commit d2ebfc3

Please sign in to comment.