feat(cloudflared): add cloudflared_tunnel_lookup_delay input #441

Merged
Defame1297 merged 2 commits from feat/cloudflared-lookup-delay into main 2026-11-27 19:14:51 +00:00
Owner

What and why

Closes #424

New role input cloudflared_tunnel_lookup_delay (int, default 5) sets the seconds between the three retries of a 404 from the tunnel lookup in roles/cloudflared/tasks/configure.yml. The default keeps today's behaviour. tasks/validate.yml refuses a negative value (the same | int(-1) >= 0 pattern as the docker role), and verify.yml has a negative test for it, as roles/AGENTS.md asks for every validation. The Molecule failure cases pass 0, because the stub API answers at once and never changes its answer; the retries still run, so the retry path stays tested without the 5-second waits.

Verified

  • pre-commit run --files <changed files>: all hooks pass, including ansible-lint, yamllint, REUSE and antsibull-changelog-lint; ansible-test sanity (pre-push) passed.
  • ansible-playbook --syntax-check on roles/cloudflared/molecule/default/verify.yml.
  • A local check-mode play runs validate_argument_spec against the main entry point's spec and the role's validate.yml. Delays 0 and 5 are accepted, -1 is refused by the new assert and abc by the spec.
  • A delay templated to 0 with retries: 3 still makes every attempt.
  • Reviewed by a separate agent: only the main entry point reaches the lookup and it validates first; no failure case depends on elapsed time (the stub's answers don't change over time).

Not verified

  • The Molecule default scenario, including the new lookup-delay-negative case; it runs in CI only.

  • I confirm third-party material is recorded in NOTICE and REUSE.toml, or there is none.

Assisted-by: Claude Code

## What and why Closes #424 New role input `cloudflared_tunnel_lookup_delay` (int, default 5) sets the seconds between the three retries of a 404 from the tunnel lookup in `roles/cloudflared/tasks/configure.yml`. The default keeps today's behaviour. `tasks/validate.yml` refuses a negative value (the same `| int(-1) >= 0` pattern as the docker role), and `verify.yml` has a negative test for it, as roles/AGENTS.md asks for every validation. The Molecule failure cases pass 0, because the stub API answers at once and never changes its answer; the retries still run, so the retry path stays tested without the 5-second waits. ## Verified - `pre-commit run --files <changed files>`: all hooks pass, including ansible-lint, yamllint, REUSE and antsibull-changelog-lint; `ansible-test sanity` (pre-push) passed. - `ansible-playbook --syntax-check` on `roles/cloudflared/molecule/default/verify.yml`. - A local check-mode play runs `validate_argument_spec` against the main entry point's spec and the role's `validate.yml`. Delays 0 and 5 are accepted, -1 is refused by the new assert and `abc` by the spec. - A delay templated to 0 with `retries: 3` still makes every attempt. - Reviewed by a separate agent: only the `main` entry point reaches the lookup and it validates first; no failure case depends on elapsed time (the stub's answers don't change over time). ## Not verified - The Molecule `default` scenario, including the new `lookup-delay-negative` case; it runs in CI only. --- - [x] I confirm third-party material is recorded in `NOTICE` and `REUSE.toml`, or there is none. Assisted-by: Claude Code
Claude added 1 commit 2026-11-27 14:49:31 +00:00
feat(cloudflared): add cloudflared_tunnel_lookup_delay input
Build / build (pull_request) Successful in 41s
Lint / lint (pull_request) Successful in 3m27s
Molecule / molecule (pull_request) Successful in 4m11s
1048628cc4
The tunnel lookup retries a 404 three times, 5 seconds apart, before it
trusts it. The new input sets that delay (default 5, as before), and
validate.yml refuses a negative value. The Molecule failure cases pass 0:
the stub API answers at once, and the three retries still run.

Assisted-by: Claude Code:claude-opus-5-5
Defame1297 added 1 commit 2026-11-27 19:06:46 +00:00
Merge branch 'main' into feat/cloudflared-lookup-delay
Build / build (pull_request) Successful in 34s
Lint / lint (pull_request) Successful in 2m55s
Molecule / molecule (pull_request) Successful in 3m34s
084d2d592f
Defame1297 scheduled this pull request to auto merge when all checks succeed 2026-11-27 19:07:00 +00:00
Defame1297 approved these changes 2026-11-27 19:07:43 +00:00
Defame1297 merged commit 1be02c574b into main 2026-11-27 19:14:51 +00:00
Defame1297 deleted branch feat/cloudflared-lookup-delay 2026-11-27 19:14:54 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mortis/Kamino#441