The plain scalar `cloudflared_test_posts[0] is search('"status": 200')`
holds ': ', so YAML parsed it as a one-key mapping and ansible-core
refused it ("Conditional expressions must be strings"). A folded block
scalar keeps it a string.
Assisted-by: Claude Code:claude-opus-5-5
molecule interpolates environment variables in molecule.yml, so `$1`
and `$*` in the embedded stub script failed the config parse ("Invalid
placeholder") before any step ran. `$$` renders as a literal `$`.
Assisted-by: Claude Code:claude-opus-5-5
Cleanup now checks /proc/<pid>/cmdline before it signals the pid, so a
reused pid is never killed, and removes the pid file afterwards.
Assisted-by: Claude Code:claude-opus-5-5
The overwrite guard listed the zone's first 100 records only, so a
record further on went unseen. It now queries each ingress hostname by
name and compares names case-insensitively, and the prune listing pages
through result_info.total_pages. Query values are urlencoded. The
template task validates config.yml with cloudflared before it replaces
the file; the rendered content is unchanged. The API stub filters by
name and pages to match.
Assisted-by: Claude Code:claude-opus-5-5
Ingress hostnames must be lowercase, with an optional leading *. and no
whitespace: they land unquoted in config.yml. The service account names
and directories must hold no newline or %, which the unit would read as
directives, and the directories must be absolute. A set tunnel id must
be a lowercase UUID, the shape the stale-credentials search relies on.
Each refusal has a negative case in the scenario.
Assisted-by: Claude Code:claude-opus-5-5
A lookup that still returned 404 after its retries failed the lookup
task itself, whose output no_log hides, so the message with the re-mint
steps never ran. The lookup now ignores its own failure; the next task
fails with the re-mint steps for a 404 or a deleted tunnel, and a new
one fails with the HTTP status for any other lookup error.
Assisted-by: Claude Code:claude-opus-5-5
Runs without Cloudflare and without a real cloudflared: a stub of the
Cloudflare API on the controller's loopback answers the tunnel, zone and
DNS record calls through cloudflared_api_base_url, a stub binary stands
in for the daemon, and the releases come from file:// URLs.
Covers the converge with an update through _binary_update and its
idempotence, the rendered files and the running unit, the input asserts,
the deleted-tunnel and DNS guards, a stale hash and a failed checksum,
the mint entry point (as child processes outside CI) and the remove
path. The cloudflare_dns calls cannot reach the stub and are not run.
Assisted-by: Claude Code:claude-opus-5-5
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