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:
- "{{ consul_domain }}=127.0.0.1:8600"
- "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 }}"
dnssec: "off"

View File

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

View File

@ -1,4 +1,3 @@
job "pihole" {
datacenters = ["homelab"]
priority = 100
@ -54,7 +53,7 @@ job "pihole" {
}
}
config {
image = "pihole/pihole:latest"
image = "pihole/pihole:2023.10.0"
network_mode = "host"
volumes = [
"local/dnsmasq.d/02-localresolver.conf:/etc/dnsmasq.d/02-localresolver.conf",
@ -86,7 +85,7 @@ job "pihole" {
template {
data = <<EOH
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
{{end}}
domain=ducamps.win