The docker driver's community.docker.docker connection starts the docker CLI for every task
on every host, and each playbook run discovers the interpreter on every container although
both molecule images ship /usr/bin/python3. The shared base config now sets
provisioner.connection_options, which molecule merges over the driver's own connection vars
for the container hosts only, so localhost keeps the controller's Python.
community.docker 5.4.1's docker_api connection supports pipelining and become and needs only
requests, which requirements-dev.lock already pins. The docker CLI bind mount in molecule.yml
stays until a green run shows nothing needs it; its comment and two others that named the
CLI's calls now describe the API connection.
Closes#455
Assisted-by: Claude Code
Part of #432. The start-order test now reads its scenarios and their seconds
from the run script's list, so a refreshed list does not break it; the
empty-lanes test only asserts the value is accepted, and the script's header
and duration-list comments are rewrapped and say the list is keyed by
scenario directory.
Assisted-by: Claude Code
Part of #432. A long scenario started late sets the end of a full run, so
run_molecule_scenarios.sh now starts scenarios by the durations of the last
full run, longest first, with an unlisted scenario first; the log groups keep
the selection order. A workflow_dispatch input `lanes` reaches the script as
MOLECULE_LANES, so full runs with different lane counts can be compared; an
empty value keeps the default of 4.
The shared molecule config enables ansible.posix.profile_tasks (summary only)
and ansible.posix.timer, so each scenario's log shows where its time goes.
Assisted-by: Claude Code
Set docker_keyring_checksum together with docker_gpg_url, and state that
the checksum is the hex digest without the sha256: prefix.
Assisted-by: Claude Code
The key that signs the Docker repository was trusted as whatever the URL served. It is now checked
against a pinned sha256, so a changed key stops the install until a person has verified it.
Assisted-by: Claude Code
The molecule image ships without apt lists, and --check does not refresh
them, so the fresh-host check found no nfs-common to install and failed
with "No package matching 'nfs-common' is available". The docker, pihole,
system_baseline and traefik scenarios refresh the cache in prepare for the
same reason.
Refs #402
Assisted-by: Claude Code
Installs nfs-common and manages NFS mount entries from nfs_client_mounts
(src, path, optional opts, state present or absent). Each mount point is
created without owner, group or mode, because once a share is mounted a
chown or chmod there changes the permissions on the NFS server. The role
writes only the fstab line and reloads systemd; it never mounts or
unmounts. An absent entry maps to ansible.posix.mount's absent_from_fstab,
which removes the line and leaves the share and the directory alone.
The default options are _netdev,nofail. x-systemd.automount is left out.
Verified locally: yamllint, ansible-lint (production profile), syntax check
of the scenario playbooks, the controller-side refusals of verify.yml (14
cases, each matched on its own message), and the module's fstab behaviour
against a scratch fstab (replacement, absent_from_fstab, idempotence).
Not verified: Molecule, which runs only in CI; the apt install and the
daemon-reload handler; that systemd generates the mount units in the
scenario's containers.
Refs #402
Assisted-by: Claude Code
Minor release: new inputs for system_baseline (extra packages, skipping
the upgrade during a vzdump backup, leaving journald alone), cloudflared
and traefik, a staleness window for distribution-only APT refreshes, and
facts read through ansible_facts in docker, gitea_runner and
system_baseline.
Assisted-by: Claude Code
The new check on system_baseline_journal_max_use refused sizes journald
accepts (a bare byte count, 1.5G, 10 M, P and E units), which 3.1.0
wrote as given, and accepted infinity, which SystemMaxUse does not take.
The check now follows journald's parse_size(): a number with an
optional upper-case B, K, M, G, T, P or E, still with no line break.
Assisted-by: Claude Code
Set connection.pipelining in the shared Molecule base config. Without
it, every remote task over the community.docker.docker connection pays
extra docker exec and docker cp calls to create a temp dir, copy the
module in and clean up; with it, the module goes over stdin.
The docker connection declares has_pipelining and has no pipelining
option of its own, so core's global setting applies. No role or image
sets requiretty.
Closes#423
Assisted-by: Claude Code:claude-opus-5-5
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
Add .config/molecule/config.yml, which molecule merges under every
scenario's molecule.yml. prerun is off: the CI wrapper already puts the
checkout first on ANSIBLE_COLLECTIONS_PATH, so molecule's per-scenario
reinstall of mortis.kamino into ANSIBLE_HOME is redundant. gathering is
smart, so each host's facts are gathered once per playbook run instead
of in every play.
Add .config to build_ignore so scripts/check_tarball.py does not fail
the build, and reword the Molecule rule and the two script comments that
said molecule installs the collection into each scenario's ANSIBLE_HOME.
Assisted-by: Claude Code:claude-opus-5-5
The docker prerequisites and the system_baseline packages install only
from the distribution's sources, yet refreshed the APT cache on every
run. They now pass cache_valid_time: 3600, as the system_baseline update
task and user_management already do.
The docker and tailscale installs from the role's own APT source keep
refreshing on every run, so a run that wrote the source line but failed
to fetch its lists heals on the next run. The update entry points are
unchanged.
The system_baseline README tells a consumer who adds a source just
before the role to refresh the cache themselves.
Assisted-by: Claude Code:claude-opus-5-5
converge.yml is replayed by check, converge, check and idempotence on
both platforms, so the validation-only plays in it ran eight times per
scenario. They need no container: move them to the top of verify.yml,
on localhost in check mode, so they run once and a regressed refusal
cannot change the controller.
Applies to the default scenarios of system_baseline, docker, sshd and
systemd_hardening. The systemd_hardening refusal of a drop-in entry
that is not a mapping comes after the disable and mask tasks, so it
moves to verify.yml but stays on the container. The README Tests
sections say where each check now runs.
Assisted-by: Claude Code:claude-opus-5-5
A change to .gitea/workflows/molecule.yml selected every scenario, so a
molecule image pin bump or a comment edit ran the full set. The selector
now compares the merge-base and HEAD copies of the workflow:
- `#` and blank lines outside a block scalar are dropped; inside one
(a `run: |` script, where they may be heredoc content) they count;
- the line after each CI_IMAGE, MOLECULE_IMAGE and MOLECULE_IMAGE_2604
`>-` key must be its value, deeper than the key and in the shape
Renovate writes, in both copies;
- comments only select nothing; a MOLECULE_IMAGE* pin selects every
scenario with a file naming it, or every scenario when a shared
molecule file names it or a file is unreadable or a symlink;
- CI_IMAGE, any other difference or a git error selects everything.
reason_for() is split out of select() to stay under ruff's complexity
limit. The Molecule rule in .gitea/workflows/AGENTS.md describes the
new case.
Assisted-by: Claude Code:claude-opus-5-5