The traefik role hardcoded the GitHub release URLs for the archive and checksums. A new input, traefik_release_url, sets the directory both are downloaded from, for a mirror. The default is the GitHub release directory of traefik_version, so nothing changes for existing hosts.
The default scenario uses it: verify's update path now downloads two stand-in releases that prepare.yml builds under /opt/molecule-download/<version>/. Each has a stub traefik that answers version like the real binary and otherwise sleeps, its archive under the real file name, and a sha256sum checksums file. Nothing binary is committed, and the role's download, checksum check and swap run unchanged. The converge still downloads the real release from GitHub, so the default URL stays covered. traefik_verify_other_version moved to the scenario's group vars so prepare and verify share it. After the update path the installed binary is the stub, so nothing after it asserts real Traefik behaviour (stated in the README and in verify).
Verify replaces the fixed 15 s pause with a poll (30 x 2 s) for the Unable to obtain ACME certificate line that Traefik v3's ACME provider (pkg/provider/acme/provider.go) logs for a failed order or account registration. Only a line whose RFC 3339 stamp, the first field in Traefik's default file log format, is at or after the running process's ExecMainStartTimestamp counts, so a line left by the process converge restarted does not; a missing start time, a missing line or an unparseable stamp fails the check. It then asserts NRestarts is 0, because with Restart=always a crash would otherwise look like a running service.
Verified
pre-commit run --files <changed files> and the commit hooks: passed (ansible-lint, yamllint, reuse, antsibull-changelog-lint, gitleaks); ansible-test sanity (pre-push) passed.
ansible-playbook --syntax-check on the scenario's converge, prepare and verify playbooks: passed.
Ran the role's tasks/binary/download.yml locally against a stand-in built the same way, with a file://traefik_release_url: download, checksum check and extraction passed, and the extracted stub's version output matches _binary_update's version regex.
Ran the ACME wait's shell body against sample logs with systemctl stubbed: it passes only for a matching line stamped after the process start, and fails for an older line, no line, a missing log, an unparseable stamp, and an empty or malformed start time.
Two review rounds by a separate agent (argument_specs convention for Jinja defaults, fixture shape vs. download.yml and _binary_update, NRestarts semantics, systemd ≥ 251 in both molecule images for --timestamp=unix, the log format from the role's template).
Not verified
The Molecule scenario was not run locally; CI runs it.
That this scenario's Traefik logs the ACME failure line in practice: the message and the log format come from the Traefik v3.7.19 source, not from an observed log. If the line never appears, the poll fails loudly after 60 s rather than passing.
I confirm third-party material is recorded in NOTICE and REUSE.toml, or there is none.
Assisted-by: Claude Code
## What and why
Closes #426
The traefik role hardcoded the GitHub release URLs for the archive and checksums. A new input, `traefik_release_url`, sets the directory both are downloaded from, for a mirror. The default is the GitHub release directory of `traefik_version`, so nothing changes for existing hosts.
The `default` scenario uses it: verify's update path now downloads two stand-in releases that `prepare.yml` builds under `/opt/molecule-download/<version>/`. Each has a stub `traefik` that answers `version` like the real binary and otherwise sleeps, its archive under the real file name, and a `sha256sum` checksums file. Nothing binary is committed, and the role's download, checksum check and swap run unchanged. The converge still downloads the real release from GitHub, so the default URL stays covered. `traefik_verify_other_version` moved to the scenario's group vars so prepare and verify share it. After the update path the installed binary is the stub, so nothing after it asserts real Traefik behaviour (stated in the README and in verify).
Verify replaces the fixed 15 s pause with a poll (30 x 2 s) for the `Unable to obtain ACME certificate` line that Traefik v3's ACME provider (`pkg/provider/acme/provider.go`) logs for a failed order or account registration. Only a line whose RFC 3339 stamp, the first field in Traefik's default file log format, is at or after the running process's `ExecMainStartTimestamp` counts, so a line left by the process converge restarted does not; a missing start time, a missing line or an unparseable stamp fails the check. It then asserts `NRestarts` is `0`, because with `Restart=always` a crash would otherwise look like a running service.
## Verified
- `pre-commit run --files <changed files>` and the commit hooks: passed (ansible-lint, yamllint, reuse, antsibull-changelog-lint, gitleaks); `ansible-test sanity` (pre-push) passed.
- `ansible-playbook --syntax-check` on the scenario's converge, prepare and verify playbooks: passed.
- Ran the role's `tasks/binary/download.yml` locally against a stand-in built the same way, with a `file://` `traefik_release_url`: download, checksum check and extraction passed, and the extracted stub's `version` output matches `_binary_update`'s version regex.
- Ran the ACME wait's shell body against sample logs with `systemctl` stubbed: it passes only for a matching line stamped after the process start, and fails for an older line, no line, a missing log, an unparseable stamp, and an empty or malformed start time.
- Two review rounds by a separate agent (argument_specs convention for Jinja defaults, fixture shape vs. `download.yml` and `_binary_update`, NRestarts semantics, systemd ≥ 251 in both molecule images for `--timestamp=unix`, the log format from the role's template).
## Not verified
- The Molecule scenario was not run locally; CI runs it.
- That this scenario's Traefik logs the ACME failure line in practice: the message and the log format come from the Traefik v3.7.19 source, not from an observed log. If the line never appears, the poll fails loudly after 60 s rather than passing.
---
- [x] I confirm third-party material is recorded in `NOTICE` and `REUSE.toml`, or there is none.
Assisted-by: Claude Code
The archive and checksums URLs were hardcoded to the GitHub releases.
traefik_release_url (default: the GitHub release directory of
traefik_version, as before) lets a host download from a mirror.
The Molecule scenario uses it: verify's update path now downloads
stand-in releases that prepare.yml builds under /opt/molecule-download
(a stub binary answering `version`, its archive and a sha256sum
checksums file), so it no longer fetches two more real releases per
host. The converge still downloads the real release from GitHub, which
keeps the default URL proven. traefik_verify_other_version moves to the
scenario's group vars so prepare and verify share it. The update path
leaves the stub installed, which the README and verify now state.
Verify replaces the fixed 15 s pause with a poll (30 x 2 s) for an
"Unable to obtain ACME certificate" log line stamped at or after the
running process's ExecMainStartTimestamp, so a line left by the
process converge restarted does not count. It fails closed on a
missing start time, a missing line or an unparseable stamp. It then
asserts NRestarts
is 0, since Restart=always would hide a crash.
Assisted-by: Claude Code:claude-opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What and why
Closes #426
The traefik role hardcoded the GitHub release URLs for the archive and checksums. A new input,
traefik_release_url, sets the directory both are downloaded from, for a mirror. The default is the GitHub release directory oftraefik_version, so nothing changes for existing hosts.The
defaultscenario uses it: verify's update path now downloads two stand-in releases thatprepare.ymlbuilds under/opt/molecule-download/<version>/. Each has a stubtraefikthat answersversionlike the real binary and otherwise sleeps, its archive under the real file name, and asha256sumchecksums file. Nothing binary is committed, and the role's download, checksum check and swap run unchanged. The converge still downloads the real release from GitHub, so the default URL stays covered.traefik_verify_other_versionmoved to the scenario's group vars so prepare and verify share it. After the update path the installed binary is the stub, so nothing after it asserts real Traefik behaviour (stated in the README and in verify).Verify replaces the fixed 15 s pause with a poll (30 x 2 s) for the
Unable to obtain ACME certificateline that Traefik v3's ACME provider (pkg/provider/acme/provider.go) logs for a failed order or account registration. Only a line whose RFC 3339 stamp, the first field in Traefik's default file log format, is at or after the running process'sExecMainStartTimestampcounts, so a line left by the process converge restarted does not; a missing start time, a missing line or an unparseable stamp fails the check. It then assertsNRestartsis0, because withRestart=alwaysa crash would otherwise look like a running service.Verified
pre-commit run --files <changed files>and the commit hooks: passed (ansible-lint, yamllint, reuse, antsibull-changelog-lint, gitleaks);ansible-test sanity(pre-push) passed.ansible-playbook --syntax-checkon the scenario's converge, prepare and verify playbooks: passed.tasks/binary/download.ymllocally against a stand-in built the same way, with afile://traefik_release_url: download, checksum check and extraction passed, and the extracted stub'sversionoutput matches_binary_update's version regex.systemctlstubbed: it passes only for a matching line stamped after the process start, and fails for an older line, no line, a missing log, an unparseable stamp, and an empty or malformed start time.download.ymland_binary_update, NRestarts semantics, systemd ≥ 251 in both molecule images for--timestamp=unix, the log format from the role's template).Not verified
NOTICEandREUSE.toml, or there is none.Assisted-by: Claude Code