diff options
Diffstat (limited to 'roles/pihole/templates/pihole.yaml.j2')
-rw-r--r-- | roles/pihole/templates/pihole.yaml.j2 | 20 |
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: + |