manage several local resolver

This commit is contained in:
vincent 2022-04-09 08:47:48 +02:00
parent 2636d8be51
commit 3d9b462c45
2 changed files with 13 additions and 10 deletions

View File

@ -17,13 +17,16 @@ pihole_port:
- "67:67/udp" - "67:67/udp"
- "{{pihole_http_port}}:80/tcp" - "{{pihole_http_port}}:80/tcp"
pihole_forwarder1: '1.1.1.1' pihole_forwarder1: "1.1.1.1"
pihole_forwarder2: '80.67.169.40' pihole_forwarder2: "80.67.169.40"
pihole_timezone: "Europe/Paris" pihole_timezone: "Europe/Paris"
pihole_local_domain: pihole.lan pihole_local_domain:
pihole_local_reverse_domain: '1.168.192.in-addr.arpa' - domain: local.lan
resolver: "{{ pihole_local_resolver }}"
- domain: "1.168.192.in-addr.arpa"
resolver: "{{ pihole_local_resolver }}"
pihole_local_resolver: pihole_local_resolver:
pihole_dns_servers: pihole_dns_servers:
- '127.0.0.1' - "127.0.0.1"
- '{{pihole_local_resolver | default(1.1.1.1)}}' - "{{pihole_local_resolver | default(1.1.1.1)}}"
pihole_update_container: false pihole_update_container: false

View File

@ -1,5 +1,5 @@
# {{ ansible_managed }} # {{ ansible_managed }}
## local domain forwarder ## local domain forwarder
server=/local.lan/{{pihole_local_resolver}} {% for localresolver in pihole_local_domain %}
server=/{{pihole_local_domain}}/{{pihole_local_resolver}} server=/{{localresolver.domain}}/{{localresolver.resolver}}
server=/{{pihole_local_reverse_domain}}/{{pihole_local_resolver}} {% endfor %}