From 36180489a722f358521dd7215886d25ba2ee64fb Mon Sep 17 00:00:00 2001 From: vincent Date: Sun, 3 Apr 2022 20:45:50 +0200 Subject: [PATCH] first commit --- pihole.nomad | 66 +++++++++++++++++++++++++++++++++++ vault/nomad-cluster-role.json | 9 +++++ vault/nomad-server-policy.hcl | 41 ++++++++++++++++++++++ 3 files changed, 116 insertions(+) create mode 100644 pihole.nomad create mode 100644 vault/nomad-cluster-role.json create mode 100644 vault/nomad-server-policy.hcl 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 = <