aboutsummaryrefslogtreecommitdiff
path: root/roles/pihole/templates/pihole.yaml.j2
diff options
context:
space:
mode:
authorAaditya Dhruv <[email protected]>2025-04-22 17:29:46 -0500
committerAaditya Dhruv <[email protected]>2025-05-01 20:19:51 -0500
commit55298a51cb0cc5e68c5a43869f2f32b899d3a622 (patch)
tree50d271288502bcff6f0a5133ce0839d883ee8ef7 /roles/pihole/templates/pihole.yaml.j2
init
Diffstat (limited to 'roles/pihole/templates/pihole.yaml.j2')
-rw-r--r--roles/pihole/templates/pihole.yaml.j220
1 files changed, 20 insertions, 0 deletions
diff --git a/roles/pihole/templates/pihole.yaml.j2 b/roles/pihole/templates/pihole.yaml.j2
new file mode 100644
index 0000000..7e744df
--- /dev/null
+++ b/roles/pihole/templates/pihole.yaml.j2
@@ -0,0 +1,20 @@
+version: "3"
+services:
+ pihole:
+ image: docker.io/pihole/pihole:{{ pihole.tag }}
+ container_name: pihole
+ ports:
+ - "{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}:53:53/tcp"
+ - "{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}:53:53/udp"
+ - "{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}:8000:80/tcp"
+ environment:
+ TZ: 'America/Chicago'
+ WEBPASSWORD: {{ pihole.password }}
+ volumes:
+ - 'pihole:/etc/pihole:Z'
+ - 'pihole_dnsmaq:/etc/dnsmasq.d:Z'
+ restart: unless-stopped
+volumes:
+ pihole:
+ pihole_dnsmaq:
+