docs(roles): add argument_specs and README for traefik, authentik, drawio, garage, nextcloud
Each of the five roles touched in this branch now ships: * meta/argument_specs.yml: typed schema for every variable in defaults/main.yml plus the optional inputs surfaced via this branch (traefik_extra_hosts, authentik_host_rewrite_domains, authentik_proxy_apps.mode / .allowed_groups, drawio_extra_domains, drawio_authentik_forward_auth*, garage_webui_authentik_forward_auth*). All five specs load cleanly through ansible-core's ArgumentSpecValidator. * README.md: replaces the ansible-galaxy boilerplate (where it was still in place) with a focused write-up — service vars, required secrets, ForwardAuth/idempotency notes, dependencies, and a working example playbook. authentik and garage READMEs are rewritten to cover the new knobs while preserving their existing content.
This commit is contained in:
parent
1f9292cc9a
commit
14c81657d7
10 changed files with 1348 additions and 143 deletions
|
|
@ -1,38 +1,98 @@
|
|||
Role Name
|
||||
=========
|
||||
# Traefik
|
||||
|
||||
A brief description of the role goes here.
|
||||
Ansible role to deploy Traefik v3 as a reverse proxy via Docker Compose,
|
||||
either as a public-facing DMZ proxy (file provider) or as a backend
|
||||
application proxy (docker provider).
|
||||
|
||||
Requirements
|
||||
------------
|
||||
## Requirements
|
||||
|
||||
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
|
||||
- Docker and Docker Compose installed on the target host
|
||||
- Ansible collection: `community.docker`
|
||||
- For ACME DNS-01: an RFC2136-capable nameserver with a delegated zone
|
||||
for `_acme-challenge` records and a TSIG key
|
||||
|
||||
Role Variables
|
||||
--------------
|
||||
## Role variables
|
||||
|
||||
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
|
||||
Full list with types and defaults: `meta/argument_specs.yml`. The most
|
||||
common overrides:
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
### Deployment mode
|
||||
|
||||
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
|
||||
- `traefik_mode`: `dmz` (file provider, routes to external backends) or
|
||||
`backend` (docker provider, discovers local containers). Default `backend`.
|
||||
- `traefik_backend_servers_to_proxy`: in `dmz` mode, restrict which
|
||||
inventory hosts the DMZ aggregates services from. Empty = all members
|
||||
of `backend_servers`.
|
||||
|
||||
Example Playbook
|
||||
----------------
|
||||
### Networking
|
||||
|
||||
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
|
||||
- `traefik_network`: docker network connecting traefik to its containers
|
||||
(default `proxy`).
|
||||
- `traefik_extra_hosts`: list of `host:ip` entries injected as the
|
||||
container's `extra_hosts`. Use when a downstream middleware
|
||||
(e.g. ForwardAuth to authentik on a sibling LAN) must resolve a public
|
||||
FQDN to an internal IP because the DMZ does not hairpin the public
|
||||
address back inside.
|
||||
|
||||
- hosts: servers
|
||||
roles:
|
||||
- { role: username.rolename, x: 42 }
|
||||
### Certificates
|
||||
|
||||
License
|
||||
-------
|
||||
- `traefik_cert_mode`: `acme` (Let's Encrypt via DNS-01) or `selfsigned`
|
||||
(local wildcard). Default `selfsigned`.
|
||||
- `traefik_acme_dns_zone`, `traefik_acme_dns_nameserver`,
|
||||
`traefik_acme_tsig_key`, `traefik_acme_tsig_secret`: RFC2136 / TSIG
|
||||
configuration for the ACME DNS-01 challenge.
|
||||
- `traefik_acme_tcp_only`: force lego's DNS lookups onto TCP/53 when the
|
||||
container cannot reach the nameserver over UDP.
|
||||
- `traefik_acme_disable_ans_checks`: skip the authoritative-NS
|
||||
propagation check when the SOA-listed NS resolves to an unreachable IP.
|
||||
|
||||
BSD
|
||||
### Dashboard
|
||||
|
||||
Author Information
|
||||
------------------
|
||||
- `traefik_enable_dashboard`: expose the traefik dashboard.
|
||||
- `traefik_dashboard_domain`: when set, publish the dashboard on this
|
||||
Host rule instead of the insecure port.
|
||||
|
||||
An optional section for the role authors to include contact information, or a website (HTML is not allowed).
|
||||
## Dependencies
|
||||
|
||||
- Traefik network (`traefik_network`, default `proxy`) must be created
|
||||
by the `base` role or by hand before this role runs.
|
||||
- In `dmz` mode, the proxied backend services advertise themselves via
|
||||
the `traefik_services` host_var on each backend host.
|
||||
|
||||
## Example playbook
|
||||
|
||||
Backend mode (one app server per host, docker provider):
|
||||
|
||||
```yaml
|
||||
- hosts: app_servers
|
||||
roles:
|
||||
- role: digitalboard.core.traefik
|
||||
vars:
|
||||
traefik_mode: backend
|
||||
traefik_cert_mode: acme
|
||||
traefik_ssl_email: ops@example.com
|
||||
traefik_acme_dns_zone: "_acme.example.com."
|
||||
traefik_acme_dns_nameserver: "10.0.0.53:53"
|
||||
traefik_acme_tsig_key: "acme-key"
|
||||
traefik_acme_tsig_secret: "{{ vault_traefik_tsig_secret }}"
|
||||
```
|
||||
|
||||
DMZ mode (aggregates services from `backend_servers`):
|
||||
|
||||
```yaml
|
||||
- hosts: dmz_servers
|
||||
roles:
|
||||
- role: digitalboard.core.traefik
|
||||
vars:
|
||||
traefik_mode: dmz
|
||||
traefik_cert_mode: acme
|
||||
traefik_backend_servers_to_proxy:
|
||||
- app01
|
||||
- app02
|
||||
traefik_extra_hosts:
|
||||
- "auth.example.com:172.16.19.101"
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT-0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue