feat(cloudflared): add cloudflared_tunnel_lookup_delay input #441

Open
Claude wants to merge 1 commits from feat/cloudflared-lookup-delay into main
pull from: feat/cloudflared-lookup-delay
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
All checks were successful
Build / build (pull_request) Successful in 41s
Required
Details
Lint / lint (pull_request) Successful in 3m27s
Required
Details
Molecule / molecule (pull_request) Successful in 4m11s
Required
Details
This pull request is blocked because it's outdated.
You are not authorized to merge this pull request.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/cloudflared-lookup-delay:feat/cloudflared-lookup-delay
git checkout feat/cloudflared-lookup-delay
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mortis/Kamino#441