Ansible Role for a simple Traefik reverse proxy
- Jinja 100%
Replace docker.io references with cr.simoncor.net/dockerhub pull-through cache. Official images now use explicit library/ namespace for cache compatibility. |
||
|---|---|---|
| defaults | ||
| handlers | ||
| meta | ||
| roles | ||
| tasks | ||
| templates/traefik | ||
| .ansible-lint | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| .markdownlint-cli2.jsonc | ||
| .yamllint | ||
| AGENTS.md | ||
| playbook.yaml | ||
| readme.md | ||
| renovate.json | ||
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"