migrate ducamps.eu on pdns

This commit is contained in:
vincent 2023-11-05 14:58:10 +01:00
parent 3944d444aa
commit 674813e2e4
3 changed files with 8 additions and 17 deletions

View File

@ -15,6 +15,7 @@ pdns_rec_config:
forward-zones: forward-zones:
- "{{ consul_domain }}=127.0.0.1:8600" - "{{ consul_domain }}=127.0.0.1:8600"
- "ducamps.win=192.168.1.10" - "ducamps.win=192.168.1.10"
- "ducamps.eu=192.168.1.10" - "ducamps.eu=192.168.1.5:5300"
- "1.168.192.in-addr.arpa=192.168.1.5:5300"
local-address: "{{ ansible_default_ipv4.address }}" local-address: "{{ ansible_default_ipv4.address }}"
dnssec: "off" dnssec: "off"

View File

@ -3,7 +3,7 @@ job "pdns-auth" {
datacenters = ["homelab"] datacenters = ["homelab"]
priority = 100 priority = 100
meta { meta {
force = 2 force = 3
} }
type = "service" type = "service"
constraint { constraint {
@ -32,20 +32,12 @@ job "pdns-auth" {
name = "pdns-auth" name = "pdns-auth"
port = "dns" port = "dns"
check {
name = "service: dns tcp check"
type = "tcp"
interval = "10s"
timeout = "2s"
success_before_passing = "3"
failures_before_critical = "3"
}
} }
config { config {
image = "powerdns/pdns-auth-48:latest" image = "powerdns/pdns-auth-48:latest"
network_mode = "host" network_mode = "host"
privileged=true
cap_add= ["NET_BIND_SERVICE"]
volumes = [ volumes = [
"/mnt/diskstation/nomad/pdns-auth/var:/var/lib/powerdns/", "/mnt/diskstation/nomad/pdns-auth/var:/var/lib/powerdns/",
"local/dnsupdate.conf:/etc/powerdns/pdns.d/dnsupdate.conf", "local/dnsupdate.conf:/etc/powerdns/pdns.d/dnsupdate.conf",
@ -67,7 +59,6 @@ job "pdns-auth" {
data = <<EOH data = <<EOH
dnsupdate=yes dnsupdate=yes
allow-dnsupdate-from=192.168.1.41/24 allow-dnsupdate-from=192.168.1.41/24
local-address=0.0.0.0:5300
local-port=5300 local-port=5300
EOH EOH
} }
@ -127,7 +118,7 @@ SQLALCHEMY_DATABASE_URI=postgresql://pdns-admin:{{ .Data.data.pdnsadmin }}@activ
task "keepalived" { task "keepalived" {
driver = "docker" driver = "docker"
lifecycle { lifecycle {
hook = "poststart" hook = "prestart"
sidecar = true sidecar = true
} }

View File

@ -1,4 +1,3 @@
job "pihole" { job "pihole" {
datacenters = ["homelab"] datacenters = ["homelab"]
priority = 100 priority = 100
@ -54,7 +53,7 @@ job "pihole" {
} }
} }
config { config {
image = "pihole/pihole:latest" image = "pihole/pihole:2023.10.0"
network_mode = "host" network_mode = "host"
volumes = [ volumes = [
"local/dnsmasq.d/02-localresolver.conf:/etc/dnsmasq.d/02-localresolver.conf", "local/dnsmasq.d/02-localresolver.conf:/etc/dnsmasq.d/02-localresolver.conf",
@ -86,7 +85,7 @@ job "pihole" {
template { template {
data = <<EOH data = <<EOH
server=/ducamps.win/192.168.1.10 server=/ducamps.win/192.168.1.10
server=/ducamps.eu/192.168.1.10 server=/ducamps.eu/192.168.1.5
{{range service "consul"}}server=/consul/{{.Address}}#8600 {{range service "consul"}}server=/consul/{{.Address}}#8600
{{end}} {{end}}
domain=ducamps.win domain=ducamps.win