Commit Graph
56 Commits
Author SHA1 Message Date
Dragonish 6c2d124b3f fix(systemd_hardening): look up the listed units instead of listing every unit file
Build / build (pull_request) Successful in 20s
Molecule / molecule (pull_request) Canceled after 0s
Lint / lint (pull_request) Canceled after 38s
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
2026-11-22 19:41:23 +00:00
Defame1297andClaude Opus 5.5 1b7517ef0d chore(release): 1.10.0
Build / build (pull_request) Successful in 15s
Lint / lint (pull_request) Successful in 57s
Molecule / molecule (pull_request) Successful in 19m28s
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-11-22 17:29:51 +00:00
Defame1297andClaude Opus 5.5 e296eea609 feat(gitea_runner): add the gitea_runner role
Build / build (pull_request) Successful in 15s
Lint / lint (pull_request) Successful in 50s
Molecule / molecule (pull_request) Failing after 1m10s
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
2026-11-22 16:26:49 +00:00
Defame1297andClaude Opus 5.5 0837cc387f ci(gitea): warn before the Gitea release key stops verifying releases
Build / build (pull_request) Successful in 15s
Gitea release key / check (pull_request) Successful in 9s
Lint / lint (pull_request) Successful in 51s
Molecule / molecule (pull_request) Canceled after 36s
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
2026-11-22 07:29:31 +00:00
Defame1297andClaude Opus 5.5 1370cb2bdc chore(release): 1.9.0
Build / build (pull_request) Successful in 12s
Lint / lint (pull_request) Successful in 44s
Molecule / molecule (pull_request) Successful in 17m2s
Adds the gitea role, the second role of wave 2 and the second caller of the
internal _binary_update role. Existing roles are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-11-21 22:45:27 +00:00
Defame1297andClaude Opus 5.5 f060461152 feat(gitea): add the gitea role
Build / build (pull_request) Successful in 12s
Lint / lint (pull_request) Failing after 43s
Molecule / molecule (pull_request) Successful in 1m20s
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
2026-11-21 21:53:20 +00:00
Defame1297andClaude Opus 5.5 3ad72d78b3 chore(release): 1.8.0
Build / build (pull_request) Successful in 13s
Lint / lint (pull_request) Successful in 56s
Molecule / molecule (pull_request) Successful in 14m55s
Adds the traefik role, the first role of wave 2, and the internal _binary_update role
it uses to swap in a new release with rollback (not part of the public API). The
trivial README and comment fixes of the wave 1 scrub ship here too. Existing roles are
unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-11-20 19:40:12 +00:00
Defame1297andClaude Opus 5.5 589b71a312 feat(traefik): add the traefik role
Build / build (pull_request) Successful in 15s
Lint / lint (pull_request) Successful in 1m32s
Molecule / molecule (pull_request) Successful in 3m38s
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
2026-11-20 19:20:37 +00:00
Defame1297andClaude Opus 5.5 f4965db6f3 feat(_binary_update): add the internal binary update role
Build / build (pull_request) Successful in 12s
Lint / lint (pull_request) Successful in 1m17s
Molecule / molecule (pull_request) Successful in 11m34s
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
2026-11-20 19:00:19 +00:00
Defame1297andClaude Opus 5.5 e2d89b9617 docs: drop environment names left in fail2ban and systemd_hardening
Build / build (pull_request) Successful in 13s
Lint / lint (pull_request) Successful in 34s
Molecule / molecule (pull_request) Successful in 1m44s
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
2026-11-16 20:07:30 +00:00
Defame1297andClaude Opus 5.5 09cc4c7a5c chore(release): 1.7.0
Build / build (pull_request) Successful in 12s
Lint / lint (pull_request) Successful in 32s
Molecule / molecule (pull_request) Successful in 11m35s
Adds the user_management role, which completes wave 1. Its root fallback
refuses to run when the primary user's name is not ansible_user. Existing
roles are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-11-16 17:44:18 +00:00
Defame1297andClaude Opus 5.5 ce537fc6b4 fix(user_management): hand back to the created user and refuse a mismatched fallback
Build / build (pull_request) Successful in 13s
Lint / lint (pull_request) Successful in 34s
Molecule / molecule (pull_request) Successful in 10m5s
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
2026-11-16 17:27:39 +00:00
Defame1297andClaude Opus 5.5 2713753039 feat(user_management): add the user_management role
Copied from the environment repository's local role. The files are
identical except: galaxy namespace mortis; comments and the README
scrubbed of environment references (issue numbers, playbooks, inventory
groups and group_vars paths, the provisioning roles by name, the history
of the variable rename), with the technical explanation kept; the README
asks for the role by its FQCN, names the run order generically (after the
step that creates the guest, before mortis.kamino.sshd) and its example
play uses mortis.kamino.user_management; the molecule scenario calls the
role by its FQCN, follows the Kamino scenario conventions (kamino-molecule
header, scenario.test_sequence) and no longer sets ANSIBLE_COLLECTIONS_PATH
or ANSIBLE_ROLES_PATH. No variable, default, argument_specs entry or task
logic changed: the key-only root fallback, the handback and
user_management_lock_root_password (default false) are as in the source,
and prepare/verify are unchanged. The role uses ansible.posix
(authorized_key), already a galaxy.yml dependency, so galaxy.yml is
unchanged.

The README Roadmap no longer lists wave 1; CLAUDE.md names the role for
the next release.

Not verified locally: the molecule scenario (it runs on the
kamino-molecule runner in CI) and ansible-test sanity (runs on push).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-11-16 17:12:05 +00:00
Defame1297andClaude Opus 5.5 bc86c2db9f chore(release): 1.6.0
Build / build (pull_request) Successful in 11s
Lint / lint (pull_request) Successful in 29s
Molecule / molecule (pull_request) Successful in 9m1s
Adds the sshd role. ufw base rules can delete a rule (delete: true), so
an open rule can be replaced by narrower ones, and fail2ban gains
fail2ban_ignoreip. Existing behaviour is unchanged unless the new
options are used.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-11-15 22:44:55 +00:00
Defame1297 14a9a72ea2 Merge branch 'main' into feat/ufw-rule-delete
Build / build (pull_request) Successful in 11s
Lint / lint (pull_request) Successful in 30s
Molecule / molecule (pull_request) Successful in 2m38s
2026-11-15 22:31:04 +00:00
Defame1297andClaude Opus 5.5 10a620a2d9 feat(ufw): let ufw_rules entries delete a rule
An entry with delete: true (a boolean) removes the rule it describes,
passed to community.general.ufw's delete option. It lets a consumer
replace a base rule, such as an open SSH allow by narrower ones, which
the role could only add before.

- rules.yml applies the delete entries after every other rule, whatever
  their place in the list, so the replacement exists before the old rule
  goes.
- validate.yml: the schema check requires a boolean; a new check refuses
  a rule the list both adds and deletes (compared without the comment,
  port as a string), because the delete would win while the lock-out
  guard counted the add; the lock-out guard no longer counts a delete
  entry.
- service_rules keeps its own key list and does not accept delete.

Molecule: prepare stores a commented 9091 rule that the base list deletes
with an uncommented entry listed first; verify checks it is gone and the
untagged count is unchanged; the idempotence pass covers deleting a rule
that is gone. Two new refusals: an SSH rule that is only deleted (lock-out
guard) and a rule both added and deleted.

Verified locally: validate.yml against localhost in check mode (the
planned replacement list passes; the conflict, the delete-only SSH list
and a non-boolean delete are refused) and the apply order. Not verified
locally: the molecule scenario (CI only), including whether ufw matches
the commented rule from an uncommented delete.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-11-15 22:12:16 +00:00
Defame1297andClaude Opus 5.5 915f588533 feat(sshd): add the sshd role
Copied from the environment repository's local role. The files are
identical except: galaxy namespace mortis; comments, the README and the
guard failure messages scrubbed of environment references (issue numbers,
playbooks, inventory groups, the caller role's fallback, history of the
old vars/ files and of the variable renames), with the technical
explanation kept; the README's run order now asks for the ansible_user key
to be installed first instead of naming the environment's playbooks; the
molecule scenario calls the role by its FQCN (mortis.kamino.sshd), follows
the Kamino scenario conventions (kamino-molecule header,
scenario.test_sequence) and no longer sets ANSIBLE_COLLECTIONS_PATH or
ANSIBLE_ROLES_PATH. No variable, default, argument_specs type or task
logic changed; the test coverage is the same. The role uses
ansible.builtin only, so galaxy.yml's dependencies are unchanged.

The README Roadmap no longer lists sshd.

Not verified locally: the molecule scenario (it runs on the
kamino-molecule runner in CI) and ansible-test sanity (runs on push).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-11-15 22:08:10 +00:00
DragonishandClaude Sonnet 5.5 57b15df1ac feat(fail2ban): add fail2ban_ignoreip to exempt trusted addresses
Build / build (pull_request) Successful in 11s
Lint / lint (pull_request) Successful in 26s
Molecule / molecule (pull_request) Successful in 52s
Write fail2ban_ignoreip as ignoreip in the [DEFAULT] section of jail.local, so
it applies to every jail, the service jails in jail.d included. The default is
Fail2Ban's own (127.0.0.1/8 and ::1). Entries are validated (no whitespace,
\Z-anchored) because they are joined into one line.

The first run after upgrading adds the [DEFAULT] section and restarts Fail2Ban
once.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Q72rsMCgwaR1sbYZangwbp
2026-11-15 11:55:17 +00:00
Defame1297andClaude Opus 5.5 ef78484bcc chore(release): 1.5.0
Build / build (pull_request) Successful in 10s
Lint / lint (pull_request) Successful in 36s
Molecule / molecule (pull_request) Successful in 8m10s
system_baseline gains an optional tmux session on SSH login, a toggle
to skip the package update in the main flow, and pinned
unattended-upgrades origins for the pve profile. No new roles.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-11-15 09:19:04 +00:00
Defame1297andClaude Opus 5.5 4d02dbbe60 fix(system_baseline): refuse a mapping as origins and document the pin's reach
Build / build (pull_request) Successful in 11s
Lint / lint (pull_request) Successful in 34s
Molecule / molecule (pull_request) Successful in 1m43s
The origins check now refuses a dict, which Jinja's sequence test accepts.
The changelog states that the pve drop-in drops origins added in earlier
apt.conf.d files and names the opt-out; the README and the drop-in header
note that /etc/apt/apt.conf, read after apt.conf.d, can still add origins;
the verify play notes that the pve run rewrites the 50unattended-upgrades
keys and the ubuntu_lxc re-run restores them.

Refs defame1297/ansible-homelab-mono#349

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-11-14 22:23:49 +00:00
Defame1297andClaude Opus 5.5 52d06204bb feat(system_baseline): add an update toggle and pin the pve unattended-upgrades origins
Build / build (pull_request) Successful in 11s
Lint / lint (pull_request) Successful in 35s
Molecule / molecule (pull_request) Successful in 1m46s
system_baseline_update (default true) lets the main flow skip the package
update for hosts patched by a separate, operator-run flow. The update entry
point does not read it: calling it is the request to update.

The new profile key unattended_upgrade_origins is rendered into
/etc/apt/apt.conf.d/90unattended-upgrades-origins, which #clears both
origin lists before setting the pinned patterns, because apt appends list
entries across files and a plain drop-in could only widen them. The pve
profile pins Debian's point-release and security origins, never the
Proxmox repository; the ubuntu profiles pin nothing and are unchanged.

Refs defame1297/ansible-homelab-mono#349

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-11-14 22:11:36 +00:00
Defame1297 873a40c48d Merge branch 'main' into feat/system-baseline-tmux
Build / build (pull_request) Successful in 12s
Lint / lint (pull_request) Successful in 28s
Molecule / molecule (pull_request) Successful in 1m28s
2026-11-14 19:48:07 +00:00
Defame1297andClaude Opus 5.5 d4f4d748a4 chore(release): 1.4.0
Build / build (pull_request) Successful in 11s
Lint / lint (pull_request) Successful in 24s
Molecule / molecule (pull_request) Successful in 8m7s
Adds the ufw role (main, service_rules and orphan_rules entry points),
copied from the environment repository's role with unchanged
behaviour. Existing roles are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-11-14 18:31:16 +00:00
Defame1297andClaude Opus 5.5 e18db424ec feat(ufw): add the ufw role
Build / build (pull_request) Successful in 11s
Lint / lint (pull_request) Failing after 25s
Molecule / molecule (pull_request) Failing after 5m42s
Copied from the environment repository's local role. The files are
identical except: galaxy namespace mortis; comments, argument_specs
descriptions and the README scrubbed of environment references (issue
numbers, CI runs, playbooks, inventory paths and groups, scripts and
caller roles by name), with the technical explanation kept and reworded
generically; the stray-variable guard's fail message drops its issue
reference; the molecule scenario calls the role by its FQCN
(mortis.kamino.ufw), follows the Kamino scenario conventions
(kamino-molecule header, scenario.test_sequence) and no longer sets
ANSIBLE_COLLECTIONS_PATH or ANSIBLE_ROLES_PATH. No variable, default,
argument_specs type or task logic changed; the test coverage is the same.

The README follows the other Kamino roles: purpose, the main,
service_rules and orphan_rules entry points, variables, and example
plays with the FQCN and tasks_from. The meta licence stays
GPL-3.0-or-later AND GPL-3.0-only (templates/before.rules.j2 is derived
from ufw's own file, already annotated in REUSE.toml and NOTICE).
galaxy.yml's dependency comment names ufw as a community.general user.

Not verified locally: the molecule scenario (it runs on the
kamino-molecule runner in CI) and ansible-test sanity.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-11-14 16:43:29 +00:00
DragonishandClaude Sonnet 5.5 dcdc9133f6 feat(system_baseline): optional tmux session on SSH login
Build / build (pull_request) Successful in 12s
Lint / lint (pull_request) Successful in 20s
Molecule / molecule (pull_request) Successful in 1m40s
Adds tmux to the ubuntu_lxc and ubuntu_vm profiles and an opt-in
/etc/profile.d snippet that attaches an interactive SSH login to a tmux
session, created with configurable windows when it does not exist.

- system_baseline_tmux_autostart (default false), _session (default main)
  and _windows ([{name, command}]); only ubuntu_lxc and ubuntu_vm install
  the snippet, pve never does, and false removes it.
- profile.d is read only by an interactive login shell, so scp, sftp,
  ssh host command and automation are unaffected. ~/.no-tmux opts a user
  out. ForceCommand is not used: it would affect every session type.
- Names and commands are validated and shell-quoted; the script is
  root-owned. Commands run as the logging-in user and are world-readable,
  so they must hold no secret.
- Molecule converge enables it, verify checks ownership, mode, the attach
  line, the quoting and sh -n.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Q72rsMEKREGMfB9DH3T9mR
2026-11-14 14:26:19 +00:00
Defame1297andClaude Sonnet 5.5 db4ba8d5c8 ci(molecule): use molecule-ubuntu2404 0.1.6 and drop the docker prepare gnupg task
Build / build (pull_request) Successful in 12s
Lint / lint (pull_request) Successful in 20s
Molecule / molecule (pull_request) Successful in 6m7s
Moves the MOLECULE_IMAGE pin to 0.1.6, the build of #119 that carries gnupg, and
with it:

- removes the gnupg install (and its apt update) from the docker scenario's
  prepare, about 10 s of its 12 s; the role refreshes its own apt cache at
  install, so nothing relied on that update;
- adds gnupg to the image-smoke contract, so the image keeps providing it;
- drops gnupg from the docker README's list of what the scenario needs the
  Ubuntu mirrors for, with a trivial changelog fragment.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNmHMc85bomfevwUDG
2026-11-14 12:47:37 +00:00
Defame1297andClaude Opus 5.5 126e6367a3 docs(changelog): add the 1.3.0 release summary
Build / build (pull_request) Successful in 10s
Lint / lint (pull_request) Successful in 18s
Molecule / molecule (pull_request) Successful in 6m19s
CONTRIBUTING.md asks for a release_summary on every release; 1.1.0 and
1.2.0 went without one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-11-14 10:43:11 +00:00
Defame1297andClaude Opus 5.5 48350404c5 chore(release): 1.3.0
Adds the system_baseline role and declares community.general and
ansible.posix as dependencies.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-11-14 10:42:22 +00:00
Defame1297andClaude Opus 5.5 9c705a7f93 fix(system_baseline): declare dependencies and correct the review findings
Build / build (pull_request) Successful in 10s
Lint / lint (pull_request) Failing after 14s
Molecule / molecule (pull_request) Successful in 6m21s
- galaxy.yml declares community.general and ansible.posix: system_baseline is
  the first role that calls modules outside ansible.builtin, and a consumer
  that installs only this Collection failed to parse the play.
- The README override example set Automatic-Reboot to false, which every
  profile already defaults to; it now shows the opt-in.
- Comment and description wording.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-11-14 10:26:59 +00:00
Defame1297andClaude Opus 5.5 5abd1abe73 feat(system_baseline): add the system_baseline role
Copied from the environment repository's role and scrubbed for the
Collection, the same way as systemd_hardening and network_interfaces:
galaxy namespace mortis, the molecule scenario calls the role by its FQCN
and takes its paths from the workflow, the README example uses
mortis.kamino.system_baseline, and repository-local references (issue
numbers, ADRs, inventory paths, host anecdotes) are dropped. Profiles and
defaults are unchanged. The Legacy name guard and the molecule play that
tested it are dropped: the guard only protected the in-repo rename, and a
new consumer never had the old names. mock_roles in .ansible-lint lists
the FQCN.

The update and reboot task files are documented as supported entry
points (argument_specs and README): a caller that drives its own reboot,
such as a drain-aware Kubernetes node patch flow, imports them with
tasks_from and reads the system_baseline_reboot_required fact that
reboot sets. With system_baseline_reboot_if_required false, reboot only
computes the fact. Neither entry point has a required option. A new
verify play asserts the fact both ways and that the entry point does not
reboot.

Not verified locally: the molecule scenario (it runs on the
kamino-molecule runner in CI) and ansible-test sanity.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-11-14 10:19:57 +00:00
Defame1297andClaude Sonnet 5.5 de68aadf9b chore(release): 1.2.0
Build / build (pull_request) Successful in 9s
Lint / lint (pull_request) Successful in 17s
Molecule / molecule (pull_request) Successful in 4m38s
Adds the network_interfaces and systemd_hardening roles. Version bump in
galaxy.yml, the changelog built by antsibull-changelog release, README pin
example and status text, CLAUDE.md.

Verified: the commit hooks. Not verified: ansible-test sanity and the
importer (CI). The tag is the maintainer's.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-11-10 18:16:40 +00:00
Defame1297andClaude Sonnet 5.5 cf8f4b5bf0 feat(roles): add the systemd_hardening and network_interfaces roles
Build / build (pull_request) Successful in 10s
Lint / lint (pull_request) Successful in 17s
Molecule / molecule (pull_request) Successful in 4m43s
Copied from the environment repository's roles and scrubbed for the
Collection: galaxy namespace mortis, molecule scenarios call the roles by
their FQCN and take their paths from the workflow, README examples use
mortis.kamino.* and documentation addresses, repository-local references
(issue numbers, ADRs, inventory paths) are dropped. network_interfaces
loses its Legacy name guard and the molecule play that tested it: the
guard only protected the in-repo rename, and a new consumer never had the
old names. mock_roles in .ansible-lint lists both FQCNs.

Not verified locally: the molecule scenarios (they run on the
kamino-molecule runner in CI) and ansible-test sanity.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-11-10 15:09:48 +00:00
Defame1297andClaude Sonnet 5.5 ad9b07e399 chore(release): 1.1.0
Build / build (pull_request) Successful in 21s
Lint / lint (pull_request) Successful in 17s
Molecule / molecule (pull_request) Successful in 3m13s
Adds the fail2ban role. Version bump in galaxy.yml, the changelog built by
antsibull-changelog release, README pin example and status text, CLAUDE.md.

Verified: the commit hooks. Not verified: ansible-test sanity and the
importer (CI). The tag is the maintainer's.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-11-08 21:29:32 +00:00
Defame1297andClaude Sonnet 5.5 1ea478b124 feat(fail2ban): add the fail2ban role
Build / build (pull_request) Successful in 23s
Lint / lint (pull_request) Successful in 16s
Molecule / molecule (pull_request) Successful in 3m11s
Copied from the environment repository's roles/fail2ban and scrubbed for the
Collection: galaxy namespace mortis, the molecule scenario calls the role by
its FQCN (and takes its paths from the workflow, like docker's), README
examples use mortis.kamino.fail2ban, repository-local issue references are
dropped. mock_roles in .ansible-lint lists the new FQCN.

Not verified locally: the molecule scenario (runs on the kamino-molecule
runner in CI) and ansible-test sanity.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-11-08 21:20:08 +00:00
Defame1297andClaude Sonnet 5.5 562ed76bfc chore(release): 1.0.0
Build / build (pull_request) Successful in 22s
Lint / lint (pull_request) Successful in 15s
Molecule / molecule (pull_request) Successful in 2m18s
First release, holding the docker role. Version bump in galaxy.yml, the
changelog built by antsibull-changelog release, README and CLAUDE.md no
longer say there are no roles, CHANGELOG.rst is allowed in the archive
(scripts/check_tarball.py) and the generated changelog.yaml is exempt from
yamllint like changelogs/config.yaml.

Verified: the commit hooks; the tarball script's unit tests; a local
ansible-galaxy build of 1.0.0 passes scripts/check_tarball.py. Not verified:
ansible-test sanity and the importer (CI). The tag is the maintainer's.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-11-08 19:23:44 +00:00
Defame1297andClaude Sonnet 5.5 aad59fc339 feat(docker): add the docker role (#522)
Build / build (pull_request) Failing after 22s
Lint / lint (pull_request) Successful in 15s
Molecule / molecule (pull_request) Successful in 2m18s
Extracted from the environment repository, wave 1. Scrubbed of private
references: namespace mortis, no repository paths or issue numbers in
comments and docs, the removed docker_ufw_rules guard dropped, the molecule
scenario uses the FQCN and no provisioner environment overrides.
ansible-lint mocks the role's FQCN because CI checks the Collection out
outside an ansible_collections path.

Verified: the commit hooks. Not verified: the molecule scenario (CI only).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-11-08 18:59:26 +00:00
Defame1297 3852bce32a Merge branch 'main' into fix/collection-tarball-contents
Build / build (pull_request) Successful in 10s
Lint / lint (pull_request) Successful in 10s
Molecule / molecule (pull_request) Successful in 31s
2026-10-25 20:39:06 +00:00
Defame1297 76da009d12 Merge branch 'main' into fix/dev-setup-robustness
Molecule / molecule (pull_request) Skipped
Build / build (pull_request) Successful in 10s
Lint / lint (pull_request) Successful in 9s
2026-10-25 20:34:54 +00:00
Defame1297 5ea4bcdcaf Merge branch 'main' into docs/credential-and-workflow-comments
Molecule / molecule (pull_request) Skipped
Build / build (pull_request) Successful in 8s
Lint / lint (pull_request) Successful in 7s
2026-10-25 20:32:59 +00:00
Defame1297 f98cb1c6b0 Merge branch 'main' into fix/ci-concurrency-main-runs
Molecule / molecule (pull_request) Skipped
Build / build (pull_request) Successful in 8s
Lint / lint (pull_request) Successful in 8s
2026-10-25 20:29:31 +00:00
Defame1297andClaude Sonnet 5.5 ad2e4aa959 merge: bring main into fix/collection-tarball-contents and keep one script-test step
Build / build (pull_request) Successful in 11s
Lint / lint (pull_request) Successful in 11s
Molecule / molecule (pull_request) Successful in 37s
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-10-25 20:23:29 +00:00
Defame1297andClaude Sonnet 5.5 9dfec118a2 merge: bring main into fix/dev-setup-robustness and keep one script-test step
Molecule / molecule (pull_request) Skipped
Build / build (pull_request) Successful in 13s
Lint / lint (pull_request) Successful in 10s
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-10-25 20:12:30 +00:00
Defame1297andClaude Sonnet 5.5 cab2187c89 fix(ci): tighten the Collection archive check and make its guards testable
Build / build (pull_request) Successful in 9s
Lint / lint (pull_request) Successful in 8s
Molecule / molecule (pull_request) Successful in 29s
The forbidden names widen to anything containing "vault", SSH keys, .envrc and
.env* files. Names that Windows or macOS extraction would read differently are
rejected (trailing space or dot, reserved device names, "::", 8.3 aliases of
.git, non-ASCII spaces, surrogate/private-use/unassigned characters, components
over 255 bytes), and the .git test compares after NFKC and case folding.
Duplicates are compared case-insensitively, a name that is both a file and a
directory is rejected, and only one slash is stripped. A unit test builds a real
tarball with ansible-galaxy, another asserts the directories build.yml prunes are
in galaxy.yml build_ignore, lint.yml runs tests/scripts, and the Build workflow
fails unless exactly one tarball matches. The docstring states that file
symlinks are invisible to the archive check.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-10-25 19:57:40 +00:00
Defame1297andClaude Sonnet 5.5 c3cd04e013 fix(ci): make the image pin check fail closed on odd spellings and Dockerfile sources
Build / build (pull_request) Successful in 9s
Lint / lint (pull_request) Successful in 8s
Molecule / molecule (pull_request) Successful in 29s
Pin mentions are matched case-insensitively with an optional port, a nested path
and no tag, so a mis-spelled or untagged pin is reported instead of ignored. The
Dockerfile COPY/ADD reader raises an error naming file and line on a source with
a variable, quote or comment character and on a RUN --mount of the build context,
and joins continuation lines with trailing blanks. A non-UTF-8 diff path and an
empty image.yml get their own messages, lint.yml is a required consumer, the
success line lists the consumers checked, and the docstring states the known limits.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-10-25 19:54:28 +00:00
Defame1297andClaude Sonnet 5.5 72e9813394 fix(dev-setup): quote the hook path, read core.hooksPath NUL-safely and lift an empty value
Molecule / molecule (pull_request) Skipped
Build / build (pull_request) Successful in 8s
Lint / lint (pull_request) Successful in 7s
The repository path is shell-quoted (printf %q) where it is written into the
installed hooks, so a path with spaces, quotes or $(...) is data. The local
core.hooksPath values are read with -z and compared and restored element by
element, so a value with a newline survives; the loop avoids mapfile. Any local
value, including an empty or trailing empty one, is lifted for the install and
restored. tests/scripts/test_dev_setup.py covers it with stub tools in throwaway
repositories, and lint.yml now runs tests/scripts.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-10-25 19:52:32 +00:00
Defame1297andClaude Sonnet 5.5 b5751e14d6 fix(build): harden the Collection archive check and refuse source symlinks
Build / build (pull_request) Successful in 9s
Lint / lint (pull_request) Successful in 6s
Molecule / molecule (pull_request) Successful in 30s
check_tarball.py now compares path components case-insensitively (.GIT,
Molecule), rejects backslashes and control or zero-width characters,
duplicate members, an empty archive and a missing REQUIRED file, and
reports an unreadable archive as one line. Drop the shebang and the
executable bit and pass check= to subprocess.run so ansible-test sanity
passes.

ansible-galaxy dereferences symlinks, which the archive check cannot see,
so the Build workflow fails when the source tree holds a symlink.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-10-25 19:20:48 +00:00
Defame1297andClaude Sonnet 5.5 39fd0c385a fix(ci): drop the dead tag branch from the Lint concurrency group
Molecule / molecule (pull_request) Skipped
Build / build (pull_request) Successful in 9s
Lint / lint (pull_request) Successful in 7s
lint.yml has no tag trigger, so the ref_type == 'tag' branch of its
concurrency group could never run. Keep it in build.yml, which has one,
and correct the comment and changelog fragment accordingly.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-10-25 19:18:28 +00:00
Defame1297andClaude Sonnet 5.5 580df0b892 fix(build): reject links, special files and unsafe paths in the Collection archive
Build / build (pull_request) Failing after 8s
Lint / lint (pull_request) Successful in 5s
Molecule / molecule (pull_request) Successful in 35s
check_tarball.py now iterates the tar members instead of their names. Only regular
files and directories are allowed, so a symlink or hardlink cannot smuggle a
file in under an allowed directory. Absolute paths and paths with an empty, '.',
'..' or '.git' component are rejected, so roles/../.venv/x no longer passes the
top-level allow list. Tests build crafted tarballs and run the script on them.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-10-25 18:54:11 +00:00
Defame1297andClaude Sonnet 5.5 3b19cfd65e fix(ci): give tag runs their own concurrency group
Molecule / molecule (pull_request) Skipped
Build / build (pull_request) Successful in 8s
Lint / lint (pull_request) Successful in 6s
A tag run and the main run of the same commit shared the group keyed by the commit
SHA, so one could wait on the other. Tag runs are now keyed by their ref.
Cancellation stays limited to pull requests.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-10-25 18:52:57 +00:00
Defame1297andClaude Sonnet 5.5 19faa49a4c fix(dev-setup): derive the repository from the script, rename PYTHON to KAMINO_PYTHON
Molecule / molecule (pull_request) Skipped
Build / build (pull_request) Successful in 9s
Lint / lint (pull_request) Successful in 7s
The script took its repository from the caller's working directory, so running it
from another repository could create or remove that repository's .venv. It now
resolves its own location (symlinks included) and uses git -C for every call.
The interpreter variable is KAMINO_PYTHON, and the usage comment no longer claims it
always selects the venv interpreter. A core.hooksPath that resolves to the
repository's own hooks directory is lifted for the install and restored; any
other value is still rejected.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-10-25 18:48:07 +00:00