-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpb_docker_pihole_upgrade.yml
51 lines (48 loc) · 1.56 KB
/
pb_docker_pihole_upgrade.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
- hosts: pis
vars:
become: yes
tasks:
# Siehe: https://docs.ansible.com/ansible/latest/modules/docker_container_module.html
- name: Install pip3 package with apt
package:
name: python3-pip
state: present
- name: Start the new pihole container
docker_container:
name: pihole
image: pihole/pihole
restart_policy: unless-stopped
detach: yes
pull: yes
ports:
# Syntax: Hostport : Container Port
- "53:53"
- "53:53/udp"
- "127.0.0.1:47080:80"
- "127.0.0.1:47443:443"
env:
TZ: "Europe/Berlin"
# Change to Quad9, see here:
# https://www.quad9.org/service/service-addresses-and-features#rec
PIHOLE_DNS_1: "9.9.9.9"
PIHOLE_DNS_2: "149.112.112.112"
FTLCONF_REPLY_ADDR4: "192.168.2.15"
IPv6: "true"
FTLCONF_REPLY_ADDR6 : "fe80::8f0:51d1:73d5:beb8"
# https://github.com/pi-hole/docker-pi-hole#advanced-variables
FTLCONF_MAXDBDAYS: "90"
QUERY_LOGGING: "false"
volumes:
- /home/{{ansible_ssh_user}}/docker-pi-hole/etc-pihole/:/etc/pihole/
- /home/{{ansible_ssh_user}}/docker-pi-hole/etc-dnsmasq.d/:/etc/dnsmasq.d/
# dns_servers:
# - "127.0.0.1"
# - "84.200.69.80"
state: started
purge_networks: yes
networks_cli_compatible: no
labels:
com.centurylinklabs.watchtower.monitor-only: "true"
networks:
- name: "{{ docker_network_name }}"