feat(cloudflared): add the cloudflared role
Installs cloudflared as a systemd service for a locally managed Cloudflare Tunnel: checks that the tunnel exists, manages its proxied CNAMEs, renders config.yml and the credentials file, and updates the binary through the internal _binary_update role. The opt-in mint entry point creates the tunnel and registers its id and credentials as no_log facts for the calling play to persist. Validation runs first under always and asserts the tunnel secrets with the mint instructions; the secrets stay optional in the argument spec on purpose. cloudflared_manage_dns lets the records be managed elsewhere. A removal now ends the role. Assisted-by: Claude Code:claude-opus-5-5
This commit is contained in:
1 parent
560dc620a3
commit
e308683431
16 files changed
+1182
No files matched your search
@@ -0,0 +1,13 @@
|
||||
---
|
||||
minor_changes:
|
||||
- >-
|
||||
cloudflared - New role. Installs cloudflared as a systemd service for a locally managed Cloudflare Tunnel, with a
|
||||
sha256-verified binary, checks that the tunnel still exists, renders ``config.yml`` from ``cloudflared_ingress``,
|
||||
writes the tunnel credentials, and with ``cloudflared_manage_dns`` (default true) points a proxied CNAME for every
|
||||
ingress hostname at the tunnel, refusing to overwrite a record that does not point at a tunnel and pruning CNAMEs
|
||||
of this tunnel that are no longer listed. With ``cloudflared_update`` it downloads and verifies a new release
|
||||
before stopping anything and swaps it in through the internal ``_binary_update`` role, with rollback on failure.
|
||||
``cloudflared_remove`` removes the daemon and ends the role; with ``cloudflared_remove_data`` it also deletes the
|
||||
tunnel and its records on Cloudflare. The opt-in ``mint`` entry point creates the tunnel with a secret generated in
|
||||
memory and registers its id and credentials as ``no_log`` facts for the calling play to persist; it is refused
|
||||
under CI and does nothing when a tunnel is already set.
|
||||
Reference in new issue
Block a user