From cbb3bfd854a79af21256bdcb47d9261972775fa3 Mon Sep 17 00:00:00 2001 From: TuDatTr Date: Thu, 8 Dec 2022 23:54:31 +0100 Subject: [PATCH] Added tag for backup add pihole on aya01 Signed-off-by: TuDatTr --- aya01.yml | 4 ++- pi.yml | 8 +++--- roles/backblaze/tasks/backup.yml | 2 ++ roles/docker/templates/aya01/compose.yaml | 33 +++++++++++++++++++++++ roles/docker/templates/pi/compose.yaml | 5 ++-- 5 files changed, 46 insertions(+), 6 deletions(-) diff --git a/aya01.yml b/aya01.yml index c3a4918..fd60ad7 100644 --- a/aya01.yml +++ b/aya01.yml @@ -4,6 +4,8 @@ gather_facts: yes roles: - role: common - # - role: backblaze + - role: backblaze + tags: + - backup - role: power_management - role: docker diff --git a/pi.yml b/pi.yml index 767a68b..a182de6 100644 --- a/pi.yml +++ b/pi.yml @@ -3,7 +3,9 @@ hosts: raspberry gather_facts: yes roles: - - common - # - backblaze - - docker + - role: common + - role: backblaze + tags: + - backup + - role: docker diff --git a/roles/backblaze/tasks/backup.yml b/roles/backblaze/tasks/backup.yml index 36b98aa..dad6fb7 100644 --- a/roles/backblaze/tasks/backup.yml +++ b/roles/backblaze/tasks/backup.yml @@ -5,3 +5,5 @@ when: item.0.key == inventory_hostname loop: "{{ backblaze_paths | dict2items | subelements('value') }}" become: true + tags: + - backup diff --git a/roles/docker/templates/aya01/compose.yaml b/roles/docker/templates/aya01/compose.yaml index a81dee3..c333fba 100644 --- a/roles/docker/templates/aya01/compose.yaml +++ b/roles/docker/templates/aya01/compose.yaml @@ -45,6 +45,39 @@ services: - "MAX_LOG_SIZE_BYTES=1000000" - "MAX_LOG_NUMBER=20" - "TZ=Europe/Berlin" + pihole: + container_name: pihole + image: pihole/pihole:latest + restart: unless-stopped + networks: + net: {} + ports: + - "53:53/tcp" + - "53:53/udp" + - "67:67/udp" + - "8089:80/tcp" + environment: + - "WEBPASSWORD={{ vault_aya01_pihole_password }}" + - "ServerIP=192.168.20.12" + - "INTERFACE=eth0" + - "DNS1=1.1.1.1" + - "DNS1=1.0.0.1" + volumes: + - "/etc/localtime:/etc/localtime:ro" + - "{{ pihole_pihole }}:/etc/pihole/" + - "{{ pihole_dnsmasq }}:/etc/dnsmasq.d/" + dns: + - 127.0.0.1 + - 1.1.1.1 + cap_add: + - NET_ADMIN + labels: + - "traefik.enable=true" + - "traefik.http.routers.pihole.rule=Host(`pihole.{{local_domain}}`)" + - "traefik.http.routers.pihole.entrypoints=web" + - "traefik.http.services.pihole.loadbalancer.server.port=8089" + + networks: zoneminder: diff --git a/roles/docker/templates/pi/compose.yaml b/roles/docker/templates/pi/compose.yaml index c462c63..6e8bc7a 100644 --- a/roles/docker/templates/pi/compose.yaml +++ b/roles/docker/templates/pi/compose.yaml @@ -38,7 +38,8 @@ services: - "/etc/localtime:/etc/localtime:ro" - "{{ ha_config }}:/config/" privileged: true - network_mode: host + ports: + - 8123:8123 labels: - "traefik.enable=true" - "traefik.http.routers.homeassistant.rule=Host(`hass.{{local_domain}}`)" @@ -56,7 +57,7 @@ services: - "67:67/udp" - "8089:80/tcp" environment: - - "WEBPASSWORD={{ vault_pihole_password }}" + - "WEBPASSWORD={{ vault_pi_pihole_password }}" - "ServerIP=192.168.20.11" - "INTERFACE=eth0" - "DNS1=1.1.1.1"