ci: follow-ups after moving Molecule to the molecule-controller image #506

Open
Claude wants to merge 7 commits from ci/505-controller-followups into main
pull from: ci/505-controller-followups
7 Commits
Author SHA1 Message Date
Defame1297 2f5a997dd7 Merge remote-tracking branch 'origin/main' into ci/505-controller-followups
Build / build (pull_request) Successful in 24s
Molecule / select (pull_request) Successful in 5s
Lint / lint (pull_request) Successful in 2m57s
Molecule / scenarios (pull_request) Successful in 35m31s
Molecule / Result (pull_request) Successful in 1s
# Conflicts:
#	requirements-dev.lock
2026-12-02 09:47:21 +00:00
Defame1297 22f5bc33e9 chore: correct comments the ci image change left stale
Build / build (pull_request) Successful in 28s
Molecule / select (pull_request) Successful in 12s
Lint / lint (pull_request) Successful in 3m0s
Molecule / Result (pull_request) Canceled after 0s
Molecule / scenarios (pull_request) Canceled after 18m22s
image.yml's push paths listed extensions/molecule/requirements.yml under
the ci image, which no longer bakes it; it now sits with the
molecule-controller files. The list only triggers the build, so the paths
are unchanged. requirements-dev.txt no longer feeds Molecule, so the
proxmoxer comment names lint only. The ufw probe comments now say the
probe's stdout is empty in check mode, in two lines each, and two lines
in lint.yml and the workflow rules are re-wrapped.

Assisted-by: Claude Code
2026-12-02 09:26:03 +00:00
Defame1297 a48cd063ea fix(ci): treat only a NAME_UNKNOWN 404 as an image with no tags
next_image_version.py read any 404 on the first tags/list page as a
repository not pushed yet, so a wrong registry path or a proxy's 404 page
would restart the image at <base>.0 instead of failing. The OCI
distribution spec answers a missing repository with 404 and the error
code NAME_UNKNOWN, so only that answer now means no tags.

RegistryError carried only the readable text of the body, so it now also
carries the body's OCI error codes. The tests cover a plain 404 page and a
404 with another code, both of which now raise.

Assisted-by: Claude Code
2026-12-02 08:51:21 +00:00
Defame1297 6fee0ea8b2 fix(ufw): detect check mode without a command's skipped result
The probes in install.yml, orphan_rules.yml, service_rules.yml and
sysctl.yml took a skipped `command` task as the sign of check mode.
ansible-core 2.22 deprecates that: command.py marks its check-mode
`r['skipped'] = True` for removal in 2.25, and the 2.22 changelog says
"Returning skipped from a module or action plugin is deprecated and will be
removed in ansible-core 2.25". The probe would then report ok, and the role
would delete rules and edit sysctl.conf under --check.

The probe now runs `echo ran` and reads its output: a command does not run
in check mode, under --check or the check_mode keyword, so the output is
empty there. Checked against ansible-core 2.22 and a copy with the skipped
return removed, in a normal play, a check_mode play and --check.
service_rules.yml had the same probe and is changed with the others.

Assisted-by: Claude Code
2026-12-02 08:44:38 +00:00
Defame1297 39ec8e5b3c build(ci): drop molecule's Docker driver and community.docker from the ci image
Molecule runs in the molecule-controller image. In the ci image, only
Lint's "Test the repository scripts" step uses molecule:
test_check_scenarios_load_checkout.py runs check_scenarios_load_checkout.py,
which imports molecule's config lookup, and test_run_molecule_scenarios.py
expands platform names with molecule's interpolator. Both skip silently
without molecule, so molecule stays, with a comment naming the step.

Nothing in Lint or Build uses the Docker driver (molecule-plugins[docker])
or the docker SDK it pulls in: those tests use molecule's default driver
and a stub docker module. No linted file calls a community.docker module,
and a local clone, which never installs extensions/molecule/requirements.yml,
passes ansible-lint. So the driver, docker, selinux and community.docker
leave the ci image, and extensions/molecule/requirements.yml leaves its
pin record: a community.docker bump no longer publishes a ci version.

The lock is regenerated with scripts/lock-requirements.sh. Every script
test passes, none skipped, in a venv installed from the new lock.

Assisted-by: Claude Code
2026-12-02 08:43:39 +00:00
Defame1297 3414880d05 ci(molecule): rename the run script after the molecule-controller image
scripts/run_molecule_in_ci_image.sh runs inside the molecule-controller
image, not the ci image, so its name pointed readers at the wrong image.
Its test file and class follow, and every reference is updated. ADR 0003
keeps the old name: it records what that change touched.

main's selector sees the old and the new path (it diffs with
--no-renames) and neither is on IGNORED, so this pull request runs every
scenario through the renamed script of its own checkout.

Assisted-by: Claude Code
2026-12-02 08:27:57 +00:00
Defame1297 08c589e910 docs(requirements): name the molecule-controller image as Molecule's consumer
Molecule runs in the molecule-controller image, which bakes these
collections, and the run script installs them when a pull request changes
them. The header still said the ci image served Molecule and that the
workflow installed them itself.

Assisted-by: Claude Code
2026-12-02 08:21:41 +00:00