fix:hard DNS on oscar instead Nas (if NAS is shutdown cluster DNS will

shutdown )
This commit is contained in:
vincent 2024-02-26 18:53:36 +01:00
parent 0db8555fe8
commit 5718968407
4 changed files with 6 additions and 17 deletions

View File

@ -18,5 +18,7 @@ pdns_rec_config:
- "{{ domain.name }}=192.168.1.5"
- "lan.{{ domain.name }}=192.168.1.5"
- "1.168.192.in-addr.arpa=192.168.1.5:5300"
local-address: "{{ ansible_default_ipv4.address }}"
local-address: "{{ hostvars[inventory_hostname]['ansible_'+ default_interface].ipv4.address|default(ansible_default_ipv4.address) }}"
dnssec: "off"

View File

@ -3,7 +3,7 @@ dhcpd_lease_time: '72'
dhcpd_domain_name: "lan.{{ domain.name }}"
dhcpd_nameservers:
- '192.168.1.4'
- '192.168.1.43'
- '192.168.1.40'
dhcpd_zones:
- zone: "lan.{{ domain.name }}."

View File

@ -1,5 +1,5 @@
[DNS]
oberon
oscar
[dhcp]
oberon

View File

@ -43,19 +43,6 @@ job "pihole" {
name = "dns"
port = "dns"
check {
name = "service: dns dig check"
type = "script"
command = "/usr/bin/dig"
args = ["+short", "@192.168.1.4"]
interval = "10s"
timeout = "2s"
check_restart {
limit = 3
grace = "60s"
}
}
}
config {
image = "pihole/pihole:2023.10.0"
@ -73,7 +60,7 @@ job "pihole" {
env {
TZ = "Europe/Paris"
DNS1 = "192.168.1.5"
DNS2 = "192.168.1.43"
DNS2 = "192.168.1.40"
WEB_PORT = "${NOMAD_PORT_http}"
}