Ansible Role for a simple Traefik reverse proxy
Find a file
Simon Cornet 5331fe5b04
All checks were successful
ci/woodpecker/push/linting Pipeline was successful
ci: migrate from gitlab ci to woodpecker
2026-05-15 14:13:50 +02:00
.woodpecker ci: migrate from gitlab ci to woodpecker 2026-05-15 14:13:50 +02:00
defaults feat: add coraza as optional waf 2026-04-14 17:30:30 +02:00
handlers feat: initial commit 2025-10-10 22:07:00 +02:00
meta feat: initial commit 2025-10-10 22:07:00 +02:00
roles feat: implement new role layout 2025-11-01 13:25:18 +01:00
tasks feat: use pull-through cache for Docker Hub images 2026-05-08 14:42:38 +02:00
templates/traefik feat: various small fixes to the traefik config 2026-04-15 16:59:21 +02:00
.ansible-lint ci: migrate from gitlab ci to woodpecker 2026-05-15 14:13:50 +02:00
.gitignore feat: initial commit 2025-10-10 22:07:00 +02:00
.markdownlint-cli2.jsonc ci: migrate from gitlab ci to woodpecker 2026-05-15 14:13:50 +02:00
.yamllint feat: initial commit 2025-10-10 22:07:00 +02:00
AGENTS.md chore: add AGENTS.md for opencode agents 2026-02-16 10:27:05 +01:00
playbook.yaml feat: implement new role layout 2025-11-01 13:25:18 +01:00
readme.md ci: migrate from gitlab ci to woodpecker 2026-05-15 14:13:50 +02:00
renovate.json feat: initial commit 2025-10-10 22:07:00 +02:00

Ansible Role: Traefik

Install and configure Traefik - a modern HTTP reverse proxy and load balancer.

Variables

Variable Required Default Description
traefik_letsencrypt_email Yes email@example.com Email for Let's Encrypt certificates
traefik_routes Yes [] List of Traefik routes to configure
traefik_routes[].name Yes ------------------- Route domain name
traefik_routes[].service Yes ------------------- Service name
traefik_routes[].host Yes ------------------- Backend host
traefik_routes[].proto Yes ------------------- Backend protocol (http/https)
traefik_routes[].port Yes ------------------- Backend port

Example

traefik_letsencrypt_email: "admin@example.com"
traefik_routes:
  - name: "app.example.com"
    service: "webapp"
    host: "192.168.1.10"
    proto: "http"
    port: "8080"
  - name: "api.example.com"
    service: "api"
    host: "192.168.1.11"
    proto: "https"
    port: "443"