From c5751bbae2fbc8ddeafcbe809b15be65634e2b3f Mon Sep 17 00:00:00 2001 From: vincent Date: Sat, 4 Jul 2020 20:29:43 +0200 Subject: [PATCH] add docker compose example --- tasks/main.yml | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index 8dd0424..ae069d1 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,2 +1,31 @@ --- -# tasks file for ansible-pihole \ No newline at end of file +# tasks file for ansible-pihole + + +version: "3" +services: + pihole: + container_name: pihole + image: pihole/pihole:latest + ports: + - "53:53/tcp" + - "53:53/udp" + - "67:67/udp" + - "8090:80/tcp" + - "8091:443/tcp" + environment: + TZ: 'Europe/Paris' + WEBPASSWORD: 'XiEHusW6' + DNS1: '1.1.1.1' + DNS2: '80.67.169.40' + + # WEBPASSWORD: 'set a secure password here or it will be random' + # Volumes store your data between container upgrades + volumes: + - '/etc/docker/pihole/:/etc/pihole/' + - '/etc/docker/dnsmasq.d/:/etc/dnsmasq.d/' + # Recommended but not required (DHCP needs NET_ADMIN) + # https://github.com/pi-hole/docker-pi-hole#note-on-capabilities + cap_add: + - NET_ADMIN + restart: 'no'