All checks were successful
ci/woodpecker/push/linting Pipeline was successful
32 lines
1.4 KiB
Markdown
32 lines
1.4 KiB
Markdown
# Ansible Role: Traefik
|
|
|
|
Install and configure [Traefik](https://traefik.io/) - 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
|
|
|
|
```yaml
|
|
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"
|
|
```
|