ci(images): stop baking ufw and fail2ban into the molecule images #485

Merged
Defame1297 merged 3 commits from images/435-stop-baking-ufw-fail2ban into main 2026-11-29 19:11:45 +00:00
Owner

What and why

Closes #435

Under ADR 0002, an image holds no package a role installs. #478 made ufw and fail2ban --check pass on a host without the package, so the images no longer need to bake them in.

Images

  • molecule-ubuntu2404 and molecule-ubuntu2604 drop ufw and fail2ban, and keep iptables, openssh-server, python3-systemd and gnupg.
  • Their header, description and contents labels and the install comment are updated, and so are docs/images/molecule-ubuntu{2404,2604}.md.
  • Both image-smoke verify.yml files stop asserting the two packages.

Scenarios

The images delete /var/lib/apt/lists, so every scenario that reaches a ufw or fail2ban install now refreshes the APT cache first:

  • ufw default prepare installs ufw with update_cache. It needs the CLI to seed the stored rules before converge.
  • fail2ban default prepare refreshes the cache.
  • gitea default gains a prepare.yml that refreshes the cache and installs ufw, and its stale comment is fixed.
  • traefik and system_baseline already refreshed the cache.
  • The comments in the check-absent scenarios no longer say the image ships the package.

Verified

  • pre-commit run --all-files passes.
  • python -m unittest discover -s tests/scripts passes.
  • scripts/check_image_versions.py pins passes.
  • A clean-context review traced every scenario that reaches a ufw or fail2ban install and found no blocking issues. I applied its stale-comment note.
  • CI: this pull request runs the changed scenarios on the current images, which still have the packages.

Not verified

  • The scenarios on the rebuilt images. The images build after merge, and the Renovate pin pull request that follows runs every scenario against them; that run is the proof.
  • The rebuilt layer size was not measured.

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

Assisted-by: Claude Code

## What and why Closes #435 Under ADR 0002, an image holds no package a role installs. #478 made ufw and fail2ban `--check` pass on a host without the package, so the images no longer need to bake them in. **Images** - `molecule-ubuntu2404` and `molecule-ubuntu2604` drop ufw and fail2ban, and keep iptables, openssh-server, python3-systemd and gnupg. - Their header, description and contents labels and the install comment are updated, and so are `docs/images/molecule-ubuntu{2404,2604}.md`. - Both image-smoke `verify.yml` files stop asserting the two packages. **Scenarios** The images delete `/var/lib/apt/lists`, so every scenario that reaches a ufw or fail2ban install now refreshes the APT cache first: - ufw default prepare installs ufw with `update_cache`. It needs the CLI to seed the stored rules before converge. - fail2ban default prepare refreshes the cache. - gitea default gains a `prepare.yml` that refreshes the cache and installs ufw, and its stale comment is fixed. - traefik and system_baseline already refreshed the cache. - The comments in the check-absent scenarios no longer say the image ships the package. ## Verified - `pre-commit run --all-files` passes. - `python -m unittest discover -s tests/scripts` passes. - `scripts/check_image_versions.py pins` passes. - A clean-context review traced every scenario that reaches a ufw or fail2ban install and found no blocking issues. I applied its stale-comment note. - CI: this pull request runs the changed scenarios on the current images, which still have the packages. ## Not verified - The scenarios on the rebuilt images. The images build after merge, and the Renovate pin pull request that follows runs every scenario against them; that run is the proof. - The rebuilt layer size was not measured. --- - [x] I confirm third-party material is recorded in `NOTICE` and `REUSE.toml`, or there is none. Assisted-by: Claude Code
Claude added this to the CI velocity (emergency) milestone 2026-11-29 18:56:04 +00:00
Claude added 3 commits 2026-11-29 18:56:04 +00:00
The molecule images keep no APT lists, and the ufw and fail2ban scenarios, and the gitea
scenario's remove path, relied on those packages being baked in. Their prepare now refreshes the
cache, so they keep working once the images stop shipping the packages.

Refs: #435
Assisted-by: Claude Code
ADR 0002 keeps a package a role installs out of the molecule images, so its scenario exercises
the install. The ufw and fail2ban roles install their packages, so both images drop them; iptables,
openssh-server, python3-systemd and gnupg stay as fixtures. The labels, header comments, image
docs and image-smoke package lists no longer claim the packages are baked or that a converge
makes no network calls.

Refs: #435
Assisted-by: Claude Code
test(molecule): stop saying the image ships ufw and fail2ban
Build / build (pull_request) Successful in 34s
Lint / lint (pull_request) Successful in 3m38s
Molecule / molecule (pull_request) Successful in 14m55s
f1598486f0
Assisted-by: Claude Code
CODEOWNERS rules requested review from Defame1297 2026-11-29 18:56:04 +00:00
Defame1297 scheduled this pull request to auto merge when all checks succeed 2026-11-29 18:58:09 +00:00
Defame1297 approved these changes 2026-11-29 18:58:17 +00:00
Defame1297 merged commit 6e89e4d857 into main 2026-11-29 19:11:45 +00:00
Defame1297 deleted branch images/435-stop-baking-ufw-fail2ban 2026-11-29 19:11:48 +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#485