Add Pi-hole and Traefik LXC containers

- LXC 103 (pihole): Debian 12, 10.10.1.2, Pi-hole v6 with local DNS for
  gitea/grafana/traefik/pihole.homelab, Proxmox dnsmasq updated to use
  Pi-hole upstream
- LXC 104 (traefik): Debian 12, 10.10.1.3, Traefik v3 routing
  gitea.homelab → 10.10.1.125:3000, grafana.homelab → 10.10.1.137:3000
- DNAT rules on vmbr0 forwarding :80/:443 to Traefik, persisted in
  /etc/network/interfaces
- Ansible roles: pihole, traefik; playbooks: pihole.yml, traefik.yml
- site.yml excludes Debian containers from Arch-specific common role

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Adyrem
2026-05-15 16:52:20 +02:00
parent c626177daa
commit afd240de86
19 changed files with 351 additions and 34 deletions
@@ -0,0 +1,17 @@
http:
routers:
{% for svc in traefik_services %}
{{ svc.name }}:
rule: "Host(`{{ svc.host }}`)"
service: {{ svc.name }}
entryPoints:
- web
{% endfor %}
services:
{% for svc in traefik_services %}
{{ svc.name }}:
loadBalancer:
servers:
- url: "{{ svc.backend }}"
{% endfor %}
@@ -0,0 +1,18 @@
[Unit]
Description=Traefik reverse proxy
After=network-online.target
Wants=network-online.target
[Service]
Type=notify
User=traefik
Group=traefik
ExecStart=/usr/local/bin/traefik --configFile=/etc/traefik/traefik.yml
Restart=on-failure
RestartSec=5
NoNewPrivileges=true
AmbientCapabilities=CAP_NET_BIND_SERVICE
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,15 @@
api:
dashboard: true
insecure: true
entryPoints:
web:
address: ":{{ traefik_http_port }}"
providers:
file:
directory: /etc/traefik/conf.d
watch: true
log:
level: {{ traefik_log_level }}