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
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
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
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
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
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
An empty select output meant "nothing selected", so an output lost on
the way from select to result also passed the required check. select now
writes `none` for an empty selection; scenarios runs for neither `none`
nor an empty output, and result passes a skipped scenarios only for
`none`.
The result-logic test runs under sh, as act runs a job container's step
without a shell, and a new test parses what select writes to
GITHUB_OUTPUT. The fork-guard test compares each job with the literal
guard.
Assisted-by: Claude Code
A pull request that selects no scenario still took the single Molecule
runner slot to pull the controller image, select nothing and exit.
The workflow now has three jobs. select runs the selector from main's
copy in a job container on kamino-docker, in the molecule-controller pin,
and outputs the selected list. scenarios runs it on kamino-molecule and
is skipped when the list is empty. result runs always() and is the one
job to require: it fails unless select passed and scenarios passed or
was skipped for an empty list, because Gitea counts a skipped job as
passing. Scheduled and dispatched runs still select every scenario.
container.image cannot read env, so the controller pin is written in all
three jobs; a test holds the copies equal. The pin moves to 0.1.1, which
has git for the select job's checkout. Branch protection must then
require "Molecule / Result (pull_request)".
Closes#433
Assisted-by: Claude Code
Minor release: adds the nfs_client and pve_vm roles, a pinned checksum
for the Docker APT key, an hourly staleness window for the traefik APT
refresh, and fixes ufw and fail2ban failing under --check on a host
where they were not installed yet.
Assisted-by: Claude Code:claude-opus-5-5
Manage a Proxmox VE QEMU VM through the Proxmox API: clone from a
template, cloud-init user, SSH keys and network, update only on detected
drift, grow the boot disk, apply the power state, wait for SSH and
cloud-init, and delete behind pve_vm_allow_destroy. The role never sets
a cloud-init password and deletes a stored one with no_log.
Inputs are validated first under the always tag: the API credentials,
and pve_vm_disk_size while the disk is managed; the clone asserts
pve_vm_clone_vmid. Only pve_vm_exists is public, every other fact and
register is __pve_vm_.
The molecule scenario runs offline on noble and resolute: validation
with positive and refusal cases, drift detection over seeded VM configs,
and static checks over the role's task files that no proxmox_kvm task
or module_defaults entry carries cipassword and that the one task
deleting a stored cipassword is no_log. The API lifecycle and the
cloud-init wait are not exercised.
README Roadmap: the pve_vm wave 2 line and the opnsense and
proxmox_firewall line are removed; wave 3 stays.
Closes#482
Assisted-by: Claude Code:claude-opus-5-5
The ci image's labels and doc, the consumer lists, the Molecule rules in
.gitea/workflows/AGENTS.md and the accepted risk on pin bumps in SECURITY.md said Molecule
runs in the ci image. They now name the molecule-controller image, its pin files and which
pin files select scenarios.
Closes#431
Assisted-by: Claude Code
Molecule ran in the ci image, so a ci pin bump for a tool only Lint uses selected every
scenario (ADR 0003). The workflow now pins molecule-controller 0.1.0 by digest as
CONTROLLER_IMAGE, the hand-made first pin the ADR calls for.
- The run script checks /opt/molecule-pins.sha256 and installs requirements-molecule.lock
when a pull request changed a pin file.
- The selector reads CONTROLLER_IMAGE: a controller pin change selects every scenario; a ci
pin bump touches only lint.yml and build.yml, which are on IGNORED, so it selects none.
- Tests show requirements-molecule.* selects every scenario and requirements-dev.* none.
- Renovate's molecule.yml regex matches CONTROLLER_IMAGE.
Closes#434
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
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
The self-check reads the ansible-core and molecule versions from the
lock with sed; an empty result made the grep match any version. It now
fails the build instead.
Refs #477
Assisted-by: Claude Code
The registry answers tags/list for a repository that does not exist yet
with 404 NAME_UNKNOWN (OCI distribution spec), which failed the Images
version step for the first build of a new image such as
molecule-controller. A 404 on the first tags/list page now reads as no
tags, so the image gets <base>.0; a 404 on a manifest stays an error.
Refs #477
Assisted-by: Claude Code
vars/ holds constants only, so ufw's __ufw_can_configure is now a
set_fact after the install probe; the guards default it to true when the
install tasks were skipped by tags.
service_rules already skips its reconcile when `ufw status` fails under
check mode; the ufw check-absent scenario now calls it so CI holds that.
The fail2ban service jail task's tags sit with the task again, above the
comment of the configuration test.
Refs #478
Assisted-by: Claude Code
Renovate's pip-compile manager now reads requirements-molecule.lock, and
its uv manager reads the controller Dockerfile's uv pin. The bot-PR
guard holds the controller requirements and lock to the same rules as
requirements-dev.txt and its lock, so the bot's pull requests for them
are neither refused nor freer than the ci ones. The ansible tooling
group spans both locks, so one pull request moves both ansible-core
pins, which check_image_versions.py holds equal.
Checked with renovate 44.161.0 --platform=local: it extracts
requirements-molecule.txt with requirements-molecule.lock, and the uv
pin of images/molecule-controller/Dockerfile.
Refs #477
Assisted-by: Claude Code
ADR 0003 moves Molecule out of the ci image, so a ci bump for a tool
only Lint uses stops selecting every scenario. This builds and publishes
the image; nothing pins it yet (#431).
It bakes requirements-molecule.lock (ansible-core, molecule,
molecule-plugins[docker]) on the Python of .python-version and the
collections of both requirements.yml files, and records their checksums
in /opt/molecule-pins.sha256. Its last RUN checks the tool versions
against the lock, the Docker driver, every pinned collection and the
pin record, so a broken image fails its build. It has no image-smoke
scenario: it is the controller of every scenario, and the full run of
its pin pull request proves it; images/AGENTS.md records the exception.
check_image_versions.py pins now checks the Python header of both locks
and fails when their ansible-core pins differ, so Lint and Molecule
judge the code with one ansible-core. The new requirements files stay
off the selector's IGNORED list, so a bump there runs every scenario.
Refs #477
Assisted-by: Claude Code
The molecule-controller image gets a requirements file and lock of its
own (ADR 0003), so the lock script takes the file to lock:
requirements-dev.txt by default, as before, or requirements-molecule.txt.
Any other argument is a usage error, so a typo cannot write a lock
somewhere else.
The new test runs the script against a stub interpreter, so it needs
no network.
Refs #477
Assisted-by: Claude Code
Neither `accepted` nor `superseded by NNNN` fits a partial change, so the
earlier ADR stays accepted with one sentence sending its reader on to the
later ADR. ADR 0002's sentence now names the part ADR 0003 changes.
Refs: #453
Assisted-by: Claude Code
check_scenarios_load_checkout.py now merges the base config the way
molecule's CLI does (its own lookup of .config/molecule/config.yml) and
fails a scenario whose merged prerun is not false, naming the base
config. Before, it built Config with no base config, so a scenario that
turned prerun back on, or a moved base config, slowed every run and
nothing failed.
Closes#452
Assisted-by: Claude Code
Under --check the package task only reports a change, so on a fresh host
the tasks after it ran against a missing binary, /etc directory or unit
and failed. They now skip when the install would change in check mode.
fail2ban registers __fail2ban_install and guards its template, service,
config test, jail tasks and handler with the standard
`not ansible_check_mode or ... is not changed` guard. ufw registers
__ufw_install plus a command probe (ansible_check_mode is not set for a
play-level check_mode inside include_role), combined once in vars/main.yml
as __ufw_can_configure. flush_handlers is left unguarded: the handler it
runs is guarded itself.
A check-absent scenario per role purges the package, refreshes the APT
cache and runs only `check`, so each fix is tested; one scenario covering
both would make the ufw role a user of fail2ban and select the ufw and
traefik scenarios on every fail2ban change.
Fixes#478
Assisted-by: Claude Code