commit 36180489a722f358521dd7215886d25ba2ee64fb Author: vincent Date: Sun Apr 3 20:45:50 2022 +0200 first commit diff --git a/pihole.nomad b/pihole.nomad new file mode 100644 index 0000000..937806c --- /dev/null +++ b/pihole.nomad @@ -0,0 +1,66 @@ + +job "pihole" { + datacenters = ["homelab"] + type = "service" + constraint { + attribute = "${attr.unique.hostname}" + value = "oscar" + } + group "pi-hole" { + network { + mode = "host" + port "dns" { + static = 53 + } + port "http" { + static = 8090 + to = 80 + } + } + service { + name = "pihole-gui" + tags = ["pihole", "admin"] + port = "http" + } + task "server" { + driver = "docker" + config { + image = "pihole/pihole:latest" + ports = [ + "dns", + "http", + ] + volumes =[ + "local/dnsmasq.d/02-localresolver.conf:/etc/dnsmasq.d/02-localresolver.conf", + "/mnt/diskstation/nomad/pihole:/etc/pihole" + ] + + } + vault{ + policies= ["access-tables"] + + } + env { + TZ= "Europe/Paris" + DNS1= "1.1.1.1" + DNS2= "80.67.169.40" + + } + template { + data = <