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'