migrate pihole
All checks were successful
Deploy Containers / Prepare (push) Successful in 17s

This commit is contained in:
2025-11-21 03:17:11 -05:00
parent a8e6ec48a6
commit 30cb6e8786
2 changed files with 13 additions and 23 deletions

View File

@@ -39,11 +39,12 @@
- name: Create Docker Container
docker_container:
name: "{{ name }}"
recreate: true
restart_policy: unless-stopped
published_ports: "{{ published_ports | default(omit) }}"
network_mode: "{{ network_mode | default(omit) }}"
image: "{{ image.name }}:{{ image.tag }}"
command: "{{ command | default(omit) }}"
recreate: true
restart_policy: unless-stopped
networks: "{{ networks }}"
volumes: "{{ volumes | default(omit) }}"
env: "{{ env | default(omit) }}"

View File

@@ -1,28 +1,17 @@
---
- name: Create folder structure
file:
path: "{{ item }}"
state: directory
with_items:
- "{{ data_dir }}/pihole"
- name: Pull latest PiHole Docker Image
docker_image:
- name: Deploy PiHole
include_role:
name: docker
vars:
name: pihole
image:
name: pihole/pihole
tag: latest
source: pull
- name: Create PiHole Docker Container
docker_container:
name: pihole
image: pihole/pihole:latest
restart_policy: unless-stopped
recreate: true
published_ports:
- "53:53/tcp"
- "53:53/udp"
networks:
- name: homelab
published_ports:
- "{{ TRAEFIK_HOST_IP }}:53:53/tcp"
- "{{ TRAEFIK_HOST_IP }}:53:53/udp"
volumes:
- "{{ data_dir }}/pihole:/etc/pihole"
env: