12 Commits
Author SHA1 Message Date
Defame1297 75d82becbf chore!: raise the ansible-core floor to 2.22, the pinned core
Build / build (pull_request) Successful in 35s
Lint / lint (pull_request) Successful in 1m27s
Molecule / molecule (pull_request) Canceled after 10m22s
requires_ansible and every role's min_ansible_version said 2.19, which CI
never tested; CI tests only the pinned ansible-core (2.22). The floor now
equals that minor. ansible-lint 26.10.1's built-in supported list ends at
2.19, so .ansible-lint adds 2.22 for meta-runtime[unsupported-version].

BREAKING CHANGE: ansible-core 2.19, 2.20 and 2.21 (and controller Python
3.12) are no longer supported.

Closes #164

Assisted-by: Claude Code
2026-11-24 12:46:38 +00:00
Defame1297 6c2e05c95a ci(molecule): harden the stale-container sweep and correct comments
The sweep now fails the step when a timestamp cannot be parsed or a
container it removes is still there, while tolerating one another run's
sweep removed first. Its 30-minute bound and the job's timeout point at
each other, since a shorter bound would remove a live run's containers.

The concurrency comments of Lint and Build now say that runs on one ref
queue rather than cancel, and the scenarios' comment names the run
script as what removes their containers. The workflow test checks the
label filters of the sweep and cleanup steps by name.

Assisted-by: Claude Code:claude-opus-5-5
2026-11-24 09:42:03 +00:00
Defame1297 96cb9246c6 ci(molecule): isolate runs per run and drop the push trigger on main
Two Molecule runs could not overlap on one Docker daemon because every
scenario's container name was fixed; only the runner's single slot kept
them apart. Each platform is now named and labelled by KAMINO_RUN_ID
(run id and attempt, "local" outside CI), the run script expands those
names with molecule's own interpolator before removing them, and the
workflow removes its own containers by label and only sweeps labelled
leftovers older than the job timeout, so a run still going is never hit.
Non-pull-request runs get a concurrency group of their own.

Push to main no longer triggers Molecule, Lint or Build: a merged pull
request was already tested, and the nightly and manual Molecule runs
cover every scenario. Build keeps its v* tag trigger.

Assisted-by: Claude Code:claude-opus-5-5
2026-11-24 09:35:03 +00:00
Defame1297 42c391ccbe fix(cloudflared): quote the mint POST status assertion in verify.yml
Build / build (pull_request) Successful in 17s
Lint / lint (pull_request) Successful in 1m39s
Molecule / molecule (pull_request) Successful in 2m20s
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
2026-11-23 15:56:30 +00:00
Defame1297 701226f499 fix(cloudflared): escape the stub's shell variables in molecule.yml
Build / build (pull_request) Successful in 19s
Lint / lint (pull_request) Successful in 1m23s
Molecule / molecule (pull_request) Failing after 2m21s
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
2026-11-23 15:11:21 +00:00
Defame1297 92534a486e test(cloudflared): stop the API stub only while its pid is still the stub
Build / build (pull_request) Successful in 17s
Lint / lint (pull_request) Successful in 2m11s
Molecule / molecule (pull_request) Failing after 1s
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
2026-11-23 14:57:34 +00:00
Defame1297 eaa5d2f4ee fix(cloudflared): query DNS per hostname and validate config.yml first
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
2026-11-23 14:55:59 +00:00
Defame1297 fd1e9b67dd fix(cloudflared): refuse unsafe hostnames, names, paths and tunnel ids
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
2026-11-23 14:51:13 +00:00
Defame1297 ee0fa0e89e test(cloudflared): cover a tunnel lookup that fails with another status
Assisted-by: Claude Code:claude-opus-5-5
2026-11-23 14:22:22 +00:00
Defame1297 fea99a8207 fix(cloudflared): reach the re-mint message after a 404 tunnel lookup
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
2026-11-23 14:22:22 +00:00
Defame1297 9a626962a5 test(cloudflared): add the default molecule scenario
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
2026-11-23 14:22:16 +00:00
Defame1297 e308683431 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
2026-11-23 14:22:16 +00:00