requires_ansible and every role's min_ansible_version said 2.19, which CI
never tested; CI tests only the pinned ansible-core (2.22). The floor now
equals that minor. ansible-lint 26.10.1's built-in supported list ends at
2.19, so .ansible-lint adds 2.22 for meta-runtime[unsupported-version].
BREAKING CHANGE: ansible-core 2.19, 2.20 and 2.21 (and controller Python
3.12) are no longer supported.
Closes#164
Assisted-by: Claude Code
Name the roles under roles/ in the README intro and the Galaxy
description, and drop the NOTICE and REUSE.toml entries and licence texts
(Apache-2.0, EUPL-1.2, MIT) of roles that are not in the Collection. The
reuse_lint.py wrapper only tolerated those unused texts, so the hook runs
plain `reuse lint`. The GPL-3.0-only reason is ufw's before.rules.j2.
Remove HANDOFF.md and .reuse from build_ignore (neither has existed) and
correct the galaxy.yml comment on dependency bounds.
Part of #164
Assisted-by: Claude Code
The sweep now fails the step when a timestamp cannot be parsed or a
container it removes is still there, while tolerating one another run's
sweep removed first. Its 30-minute bound and the job's timeout point at
each other, since a shorter bound would remove a live run's containers.
The concurrency comments of Lint and Build now say that runs on one ref
queue rather than cancel, and the scenarios' comment names the run
script as what removes their containers. The workflow test checks the
label filters of the sweep and cleanup steps by name.
Assisted-by: Claude Code:claude-opus-5-5
Two Molecule runs could not overlap on one Docker daemon because every
scenario's container name was fixed; only the runner's single slot kept
them apart. Each platform is now named and labelled by KAMINO_RUN_ID
(run id and attempt, "local" outside CI), the run script expands those
names with molecule's own interpolator before removing them, and the
workflow removes its own containers by label and only sweeps labelled
leftovers older than the job timeout, so a run still going is never hit.
Non-pull-request runs get a concurrency group of their own.
Push to main no longer triggers Molecule, Lint or Build: a merged pull
request was already tested, and the nightly and manual Molecule runs
cover every scenario. Build keeps its v* tag trigger.
Assisted-by: Claude Code:claude-opus-5-5
Pin molecule and its Docker driver in requirements-dev.txt and bake them,
with the driver's collection, into the ci image. The Molecule job runs
docker run on the pinned ci image with the Docker socket and the checkout
mounted at the same path, as the runner user. A pull request whose pins
differ from the image installs its own pins first, so a core bump runs its
scenarios on the new core. gitea_runner no longer installs the molecule
venv and collections.
Closes#225
Assisted-by: Claude Code
Add system_baseline_reboot_throttle and system_baseline_reboot_post_delay, passed to
the throttle and post_reboot_delay of the reboot task, read by the main flow and by
tasks_from: reboot, both defaulting to 0 (today's behaviour) and validated in both.
Add system_baseline_apt_daily_timeout: when set, write a TimeoutStartSec drop-in for
apt-daily.service and reload systemd. Empty by default, which leaves the host alone.
Closes#336Closes#337
Assisted-by: Claude Code
New profile key apt_upgrade (safe or dist) resolved to
system_baseline_apt_upgrade; the pve profile uses dist, the Ubuntu
profiles keep the plain upgrade. The update entry point follows it when
system_baseline_system_type is set.
Assisted-by: Claude Code
The main entry point notified a restart. A restart stops every jail, which
flushes its bans out of the firewall until they are restored from Fail2Ban's
database when the jail starts again, and forgets failures counted toward
maxretry. A reload applies the new settings to the running jails. service_jail
already reloads.
The Restart Fail2Ban handler is removed: nothing notifies it any more, and a
handler name is not part of the role's interface (#257). A new side_effect.yml
bans an address, records the daemon's PID and rewrites jail.local; verify
asserts the new maxretry is active, the ban is in force and the PID is
unchanged (the PID is what separates a reload from a restart, since bans are
restored from the database).
Assisted-by: Claude Code
docker_apt_arch defaults to empty, which derives amd64 or arm64 from
the host architecture; another architecture fails the play, and a set
value is always used.
Assisted-by: Claude Code
The weekly schedule and image age cases matched text the disk check
schedule message also holds; match each assert's own message. Add a
case at exactly the root's use so the strict comparison is pinned, and
check the below message so a df failure cannot pass for it.
Refs #319
Assisted-by: Claude Code
system_baseline_unattended_upgrade_package_blacklist (list of regular
expressions, default empty) is written to a drop-in as
Unattended-Upgrade::Package-Blacklist; an empty list removes it.
Assisted-by: Claude Code
Give each new input its own assert message so every refused-input case
matches only its own input, and cover a negative count and a bad disk
check schedule. Fire the pressure prune only above the threshold, as
the inputs describe it. Name the disk check script apart from the
pressure service, prefix the new registers as internal, and keep the
new comments short.
Refs #319
Assisted-by: Claude Code
An age-based prune does not cap disk use: the cache grows with how often
new image versions are published, and builds on the runner then fail for
lack of space. Keep the newest N image IDs per repository in the weekly
prune, and add an hourly pressure prune that runs the count prune and a
capped builder prune when the Docker root's filesystem passes a
threshold, behind the same job gate. Both are off by default.
Refs #319
Assisted-by: Claude Code
The main flow skips the apt upgrade in check mode; autoremove and
autoclean are a task of their own and stay checked. The update entry
point is unchanged and still previews the upgrade.
Assisted-by: Claude Code
The held-by lines in AGENTS.md and the contributor docs hold rules by a control,
by review or aspirationally, and SECURITY.md's Accepted risks count repository
settings such as branch protection and code-owner approval, but the glossary
defined only control and limited it to hooks and CI jobs. Define all three, the
merge and role terms, and replace the avoided gate, guard and enforce wording.
Assisted-by: Claude Code
The plain scalar `cloudflared_test_posts[0] is search('"status": 200')`
holds ': ', so YAML parsed it as a one-key mapping and ansible-core
refused it ("Conditional expressions must be strings"). A folded block
scalar keeps it a string.
Assisted-by: Claude Code:claude-opus-5-5
molecule interpolates environment variables in molecule.yml, so `$1`
and `$*` in the embedded stub script failed the config parse ("Invalid
placeholder") before any step ran. `$$` renders as a literal `$`.
Assisted-by: Claude Code:claude-opus-5-5
Cleanup now checks /proc/<pid>/cmdline before it signals the pid, so a
reused pid is never killed, and removes the pid file afterwards.
Assisted-by: Claude Code:claude-opus-5-5
The overwrite guard listed the zone's first 100 records only, so a
record further on went unseen. It now queries each ingress hostname by
name and compares names case-insensitively, and the prune listing pages
through result_info.total_pages. Query values are urlencoded. The
template task validates config.yml with cloudflared before it replaces
the file; the rendered content is unchanged. The API stub filters by
name and pages to match.
Assisted-by: Claude Code:claude-opus-5-5
Ingress hostnames must be lowercase, with an optional leading *. and no
whitespace: they land unquoted in config.yml. The service account names
and directories must hold no newline or %, which the unit would read as
directives, and the directories must be absolute. A set tunnel id must
be a lowercase UUID, the shape the stale-credentials search relies on.
Each refusal has a negative case in the scenario.
Assisted-by: Claude Code:claude-opus-5-5
A lookup that still returned 404 after its retries failed the lookup
task itself, whose output no_log hides, so the message with the re-mint
steps never ran. The lookup now ignores its own failure; the next task
fails with the re-mint steps for a 404 or a deleted tunnel, and a new
one fails with the HTTP status for any other lookup error.
Assisted-by: Claude Code:claude-opus-5-5
Runs without Cloudflare and without a real cloudflared: a stub of the
Cloudflare API on the controller's loopback answers the tunnel, zone and
DNS record calls through cloudflared_api_base_url, a stub binary stands
in for the daemon, and the releases come from file:// URLs.
Covers the converge with an update through _binary_update and its
idempotence, the rendered files and the running unit, the input asserts,
the deleted-tunnel and DNS guards, a stale hash and a failed checksum,
the mint entry point (as child processes outside CI) and the remove
path. The cloudflare_dns calls cannot reach the stub and are not run.
Assisted-by: Claude Code:claude-opus-5-5
Installs cloudflared as a systemd service for a locally managed
Cloudflare Tunnel: checks that the tunnel exists, manages its proxied
CNAMEs, renders config.yml and the credentials file, and updates the
binary through the internal _binary_update role. The opt-in mint entry
point creates the tunnel and registers its id and credentials as no_log
facts for the calling play to persist.
Validation runs first under always and asserts the tunnel secrets with
the mint instructions; the secrets stay optional in the argument spec on
purpose. cloudflared_manage_dns lets the records be managed elsewhere.
A removal now ends the role.
Assisted-by: Claude Code:claude-opus-5-5
Look up every listed name as a socket and as a service and act on each
installed unit, the socket first. A service whose socket stays active is
started again by the next connection to its port.
Assisted-by: Claude Code
molecule's trailing destroy runs the Docker driver's destroy playbook, whose
"Wait for instance(s) deletion to complete" task alone costs about 5.6 s per
scenario, about 84 s over the 15 scenarios of a full run. The whole destroy
phase measured about 103 s per full run (the median across full runs, among
them 4764, 4714, 4698 and 4578). The workflow already removes stale
containers before the run, so it can remove each scenario's containers itself
with `docker rm -f` as soon as the scenario ends, pass or fail, and skip the
playbook.
The names come from each scenario's molecule.yml (platforms[].name) via the
molecule venv's Python and PyYAML, so no list is kept in the workflow. A
failed removal fails the step. The test_sequence rule in the workflow guidance
now says both destroys are left out and that platform names are literal.
Assisted-by: Claude Code:claude-opus-5-5
molecule's idempotence step reruns converge.yml, so plays that only prove a
role refuses bad input ran twice and added nothing the second time. The ufw,
sshd, gitea and traefik scenarios now keep only the plays that apply the role
in converge.yml; the refusal plays and gitea's child ansible-playbook guard
checks run once, first in verify.yml. Every existing assertion runs after
them, so verify still proves a refused run left the host unchanged.
Assisted-by: Claude Code:claude-opus-5-5
The role listed every service unit file to answer one question: is each
unit in its disable and mask lists installed? The listing keeps PID 1 busy
for as long as the host has unit files. Ask about the listed units only,
with one `systemctl show --property=LoadState`; a unit with no unit file
reports `not-found` and is skipped as before.
An instance name such as [email protected] is now matched when its template
exists. A template name such as [email protected] makes the lookup fail, where
the listing matched it.
Closes#283
Assisted-by: Claude Code
trim_blocks removed the newline after the endif, so the touch and the
gate call ran as one command and the ps-fails case never reached the
gate. An inline expression keeps the line break.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
Copied from the maintainer's local role and reworked for the Collection:
the binary swap and rollback of an update go through the internal
_binary_update role, input checks move to tasks/validate.yml, the
removal ends the role, commands take argv, and the molecule tooling
needs an explicit collections requirements file. Adds a molecule
scenario with stub Docker, runner and release files.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
The gitea role accepts a release only when it carries a valid signature by
gitea_gpg_key_id or one of its subkeys, so an expired, revoked or replaced
Gitea release key makes every install and update fail closed, without
warning, on the day it happens.
scripts/check_gitea_release_key.py reads the pins from the role defaults,
fetches the release key into a throwaway keyring and only the .asc of the
pinned release (never the binary), and fails when the primary key or a
signing subkey expires within 60 days, is revoked or expired, or when a
signature in the .asc is not by a valid signing key of the pinned key. Its
docstring says what to do on a failure.
The Gitea release key workflow runs it weekly, by hand, and on pull requests
that change the role defaults or the check, so a gitea_version bump is
checked against the new release's signature. It runs in the ci image at the
pin of lint.yml; that image has gpgv but not gpg, so the job installs gpg and
gpg-agent from the Ubuntu archive per run instead of making the check an
image input. The tests that make keys skip without gpg, so the Lint job's
unittest run (no gpg) still covers the parsing and rendering tests.
The workflow pins the ci image, so it joins the pin consumers of
check_image_versions.py and check_bot_pr_diff.py: Renovate's pin follow-up
edits every workflow, and the bot-diff gate would otherwise refuse that pull
request. The new workflow and script are on the molecule selector's IGNORED
list, since no scenario reads them.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
Moves the gitea role from the environment repository, the second wave 2 role and the
second caller of the internal _binary_update role.
Against the source:
- The update path stages the downloaded, signature-verified binary in a directory next to
the live one and hands the stop, backup, swap, restart, version check and rollback to
mortis.kamino._binary_update (include_role with apply tags, so --tags update reaches
it). A download or signature failure still leaves the running service untouched and
says so; a failure in the swap keeps the rollback message of _binary_update. Its default
version regex is the one the source used.
- The same two small behaviour changes as for traefik come with _binary_update: the backup
is taken whenever a live binary exists, and a failure before the stop no longer
restarts the running service.
- The update no longer removes a PID file between the stop and the start, and
gitea_pid_file is gone: the unit runs `gitea web` without --pid and has no PIDFile=,
so Gitea writes no PID file and systemd reads none.
- The database-migration warning of the source's rollback message (the previous binary
may refuse a migrated schema) moves to the gitea_update docs in the README and the
argument_specs, since _binary_update owns the failure message.
- The legacy name guard (pre-rename variables of the environment) is dropped, as in the
wave 1 roles, and the argument_specs and README no longer mention it. The jwt secret,
mailer and e-mail confirmation asserts stay.
- Environment references are gone from comments, app.ini.j2, the README and the
argument_specs: issue numbers, decision records, host names, inventory paths,
playbooks, the network and proxy layout and other roles' copies of the paths. The
Renovate comment on gitea_version is dropped; the README and argument_specs recommend
pinning the version in inventory. The mint messages no longer name a playbook.
- On a fresh host the token assert and the SSH-key upload ran before the unit was
written and Gitea started, so a first install could never complete. Both now run after
the service check, and the upload first waits (up to 60 s, not under --check) for the
local listener; the listener address is resolved once for both.
- REVERSE_PROXY_LIMIT, hard-coded to 2, is now gitea_reverse_proxy_limit with default 1:
a limit above the real number of proxies lets a client forge the address Gitea logs and
Fail2Ban bans. A setup with two proxies sets it to 2.
- The gitea commands with user-supplied values (migrate, admin user list and create, and
the token mint) take argv instead of a command string; still run through sudo -u.
- gitea_version is asserted at role start to be a plain X.Y.Z, with no leading v.
- meta namespace mortis; the scenario follows the Kamino conventions (header,
test_sequence, no provisioner env) and calls the role by FQCN, also in the child
ansible-playbook of the mint CI-guard cases. Coverage is unchanged.
No other default changed; DISABLE_REGISTRATION stays hard-coded to true.
Changelog fragment, README Roadmap and the CLAUDE.md role list updated.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
Review round 2: the no-alias ban was decided for inputs only; the
fragment check requires a fragment and checks the section only for a
dropped platform; schema[role-arg-spec] holds entry-level misuse; say
why internal roles are listed in .ansible-lint-ignore; scope the
all-three-releases aim to roles that target both kinds of host.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNmHMc85bomfevwUDG
Review: name the check each pending control will be, not only its issue;
state complexity and the role-name exemption as future controls; name
schema[role-arg-spec] for the validation misuse; merge the duplicated
input rule into the role interface; add entry-point validation and the
negative-test ordering; drop the claim that contributor docs point here.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNmHMc85bomfevwUDG
State every role rule in force with its reason and how it is held. Rules
whose control has not landed say "review until #N lands".
Keep the file out of the Collection tarball (build_ignore) until the
tarball check refuses AGENTS.md at any depth, and put it on the Molecule
selector's IGNORED list: no scenario reads it.
Closes#181
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNmHMc85bomfevwUDG
Moves the traefik role from the environment repository, the first wave 2 role and the
first caller of the internal _binary_update role.
Against the source:
- The update path stages the downloaded, checksum-verified binary in a directory next to
the live one and hands the stop, backup, swap, restart, version check and rollback to
mortis.kamino._binary_update (include_role with apply tags, so --tags update reaches
it). A download or checksum failure still leaves the running service untouched and
says so; a failure in the swap keeps the rollback message of _binary_update.
- Two small behaviour changes come with _binary_update: the backup is taken whenever a
live binary exists (the source skipped it when the binary reported no version), and a
failure before the stop no longer restarts the running service.
- The legacy name guards (pre-rename variables of the environment) are dropped, as in
the wave 1 roles, and the argument_specs and README no longer mention them.
- Environment references are gone from comments, the README and the argument_specs:
issue numbers, host names, inventory paths, playbooks and the role's own history. The
Renovate comment on traefik_version is dropped, since this repository has no manager
for it; the README and argument_specs recommend pinning the version in inventory.
- meta namespace mortis; the scenario follows the Kamino conventions (header,
test_sequence, no provisioner env) and calls the role by FQCN.
- The scenario's verify gains a real version bump: down to another release (v3.7.18)
and back to the role default with traefik_update, asserting the version, an active
unit and no staging directory, backup or download left behind.
Changelog fragment, README Roadmap and the CLAUDE.md role list updated.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
Swaps a staged, verified binary into place for a systemd service: refuse when nothing
executable is staged, then reload, stop and wait, back up the live binary, rename the
staged file over it, start and wait for active, and compare the reported version. A
failure after the stop restores this run's backup, starts the service again and fails
with a message that says whether the restore and the restart worked. Under --check the
waits and the version check are skipped, so a preview against a stopped service does
not fall into the rollback. The staged file is removed in every case.
The role is internal (ADR 0004 in the environment repository): called only by roles of
this Collection by FQCN, outside the public API, marked by the underscore, [INTERNAL]
in its meta and argument_specs, and a first task that refuses a call without a parent
role. traefik is its first caller and arrives in the same release.
Two molecule scenarios use stub binaries under a stub unit, without network: default
(successful bump and idempotence, a binary that cannot start, a binary that reports the
wrong version, nothing staged, a direct call, a first install) and check_mode (the bump
under molecule check against a stopped service changes nothing).
Lint: role-name is skipped (its regex rejects the leading underscore, as for
prometheus.prometheus roles/_common), meta has no role_name (schema[meta] uses the same
regex and cannot be skipped), and .ansible-lint-ignore lists the role's own files for
var-naming[no-role-prefix], which strips the underscore from the variable but not from
the role name and so cannot pass. The ignore file is kept out of the Collection build
and is on the scenario picker's IGNORED list. The README Roadmap no longer lists the role.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
The fail2ban README example played against a consumer's real inventory
group; it now uses a generic group name. A systemd_hardening task comment
named a consumer playbook; it now describes the clash with any inventory
variable called `services` in general terms. No task or default changes.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
The handback switched the connection to ansible_user, while the role creates
user_management_ansible_user.name. When the two differed, the root fallback
created a user nobody connects as, and the handback then failed after the
changes made as root, or later plays connected as the wrong user.
The fallback now asserts, before switching to root, that the primary user's
name equals ansible_user (set as a variable), and the handback switches to
the user the role created. No change where the names are equal (the default).
Also name user_management as a user of ansible.posix in the galaxy.yml comment.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
From review of the extraction. Documentation only; behaviour is unchanged.
- The play needs gather_facts: false, or a fresh guest is unreachable before
the root fallback runs (README requirement and example, argument spec).
- user_management_authoritative skips a user whose merged key list is empty,
so emptying the list keeps that user's existing keys.
- user_management_become_password_hashed is required unless
user_management_ansible_user is overridden.
- Known limits: molecule does not exercise the fallback or the handback, the
handback reconnects as ansible_user, a partial tag run on a fresh host
fails at the handback, and the primary user can be set absent.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
The README and the comments of tasks/bootstrap.yml, tasks/handback.yml
and tasks/lock_root.yml named mortis.kamino.sshd, which the
role-independence test refuses in a role's docs. They now name the sshd
role (of this Collection), as the ufw role does for system_baseline. The
role's own FQCN in its README and scenario stays, as in sshd and ufw.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm