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
a9c33baed9
commit
1dcff92240
10 changed files with 1348 additions and 143 deletions
|
|
@ -1,38 +1,60 @@
|
|||
Role Name
|
||||
=========
|
||||
# Drawio
|
||||
|
||||
A brief description of the role goes here.
|
||||
Ansible role to deploy [draw.io](https://www.drawio.com/) (the
|
||||
self-hosted `jgraph/drawio` container) via Docker Compose behind
|
||||
Traefik, with optional authentik ForwardAuth gating.
|
||||
|
||||
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`
|
||||
- Traefik with a shared `drawio_traefik_network` (default `proxy`)
|
||||
- For ForwardAuth: a reachable authentik embedded outpost endpoint
|
||||
|
||||
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 spec with types and defaults: `meta/argument_specs.yml`. The most
|
||||
common overrides:
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
### Service
|
||||
|
||||
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.
|
||||
- `drawio_domain`: canonical hostname used in the traefik Host rule
|
||||
(default `drawio.local.test`).
|
||||
- `drawio_extra_domains`: additional hostnames the same container
|
||||
should answer on (e.g. an internal `*.int.*` FQDN so a DMZ proxy
|
||||
can reach drawio via a backend hostname).
|
||||
- `drawio_image`, `drawio_port`, `drawio_use_ssl`.
|
||||
|
||||
Example Playbook
|
||||
----------------
|
||||
### Authentik ForwardAuth
|
||||
|
||||
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
|
||||
- `drawio_authentik_forward_auth`: set to `true` to gate the editor
|
||||
behind authentik.
|
||||
- `drawio_authentik_forward_auth_url`: full URL of the embedded
|
||||
outpost ForwardAuth endpoint, e.g.
|
||||
`https://auth.example.com/outpost.goauthentik.io/auth/traefik`.
|
||||
|
||||
- hosts: servers
|
||||
roles:
|
||||
- { role: username.rolename, x: 42 }
|
||||
When enabled, traefik redirects unauthenticated requests to authentik
|
||||
for login and forwards the resulting `X-Authentik-*` identity headers
|
||||
downstream.
|
||||
|
||||
License
|
||||
-------
|
||||
## Dependencies
|
||||
|
||||
BSD
|
||||
- Traefik network (`drawio_traefik_network`, default `proxy`)
|
||||
- Optional: authentik with a Proxy/ForwardAuth provider for drawio
|
||||
(see the `authentik` role's `authentik_proxy_apps`).
|
||||
|
||||
Author Information
|
||||
------------------
|
||||
## Example playbook
|
||||
|
||||
An optional section for the role authors to include contact information, or a website (HTML is not allowed).
|
||||
```yaml
|
||||
- hosts: app_servers
|
||||
roles:
|
||||
- role: digitalboard.core.drawio
|
||||
vars:
|
||||
drawio_domain: "drawio.example.com"
|
||||
drawio_authentik_forward_auth: true
|
||||
drawio_authentik_forward_auth_url: "https://auth.example.com/outpost.goauthentik.io/auth/traefik"
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT-0
|
||||
|
|
|
|||
64
roles/drawio/meta/argument_specs.yml
Normal file
64
roles/drawio/meta/argument_specs.yml
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
---
|
||||
argument_specs:
|
||||
main:
|
||||
short_description: Deploy draw.io diagram editor via Docker Compose behind Traefik.
|
||||
description:
|
||||
- Renders a Compose stack for jgraph/drawio with traefik labels, optional
|
||||
TLS and optional authentik ForwardAuth gating.
|
||||
options:
|
||||
docker_compose_base_dir:
|
||||
type: path
|
||||
default: /etc/docker/compose
|
||||
drawio_service_name:
|
||||
type: str
|
||||
default: drawio
|
||||
drawio_docker_compose_dir:
|
||||
type: path
|
||||
description: Defaults to C({{ docker_compose_base_dir }}/{{ drawio_service_name }}).
|
||||
|
||||
drawio_domain:
|
||||
type: str
|
||||
default: drawio.local.test
|
||||
description: Canonical hostname used in the traefik Host rule.
|
||||
drawio_extra_domains:
|
||||
type: list
|
||||
elements: str
|
||||
default: []
|
||||
description:
|
||||
- Additional hostnames the same drawio container should answer on,
|
||||
e.g. an internal C(*.int.*) FQDN so a DMZ reverse-proxy can reach
|
||||
drawio via a backend hostname covered by the local traefik cert.
|
||||
drawio_image:
|
||||
type: str
|
||||
default: jgraph/drawio:latest
|
||||
drawio_port:
|
||||
type: int
|
||||
default: 8080
|
||||
drawio_extra_hosts:
|
||||
type: list
|
||||
elements: str
|
||||
default: []
|
||||
description: C(extra_hosts) entries injected into the container (Docker C(host:ip) syntax).
|
||||
|
||||
drawio_traefik_network:
|
||||
type: str
|
||||
default: proxy
|
||||
drawio_use_ssl:
|
||||
type: bool
|
||||
default: true
|
||||
|
||||
drawio_authentik_forward_auth:
|
||||
type: bool
|
||||
default: false
|
||||
description:
|
||||
- When true, traefik attaches a ForwardAuth middleware pointing at
|
||||
the authentik embedded outpost. Unauthenticated requests are
|
||||
redirected to authentik for login and the resulting
|
||||
C(X-Authentik-*) identity headers are forwarded downstream.
|
||||
drawio_authentik_forward_auth_url:
|
||||
type: str
|
||||
default: ''
|
||||
description:
|
||||
- URL of the authentik ForwardAuth endpoint, typically
|
||||
C(https://auth.example.com/outpost.goauthentik.io/auth/traefik).
|
||||
Required when C(drawio_authentik_forward_auth=true).
|
||||
Loading…
Add table
Add a link
Reference in a new issue