From 2ecf7f8765d7a026214592c39657de27d338f9e1 Mon Sep 17 00:00:00 2001 From: Defame1297 Date: Tue, 24 Nov 2026 16:43:45 +0000 Subject: [PATCH] chore(release): 2.0.0 Major release: raises the ansible-core floor to 2.22 and removes the gitea_runner molecule tooling inputs. Also new docker, fail2ban, gitea_runner and system_baseline features and a system_baseline check-mode fix. Assisted-by: Claude Code:claude-opus-5-5 --- CHANGELOG.rst | 25 ++++++ README.md | 4 +- changelogs/.plugin-cache.yaml | 2 +- changelogs/changelog.yaml | 89 +++++++++++++++++++ .../fragments/ansible-core-2.22-floor.yml | 6 -- .../fragments/docker-apt-arch-from-host.yml | 7 -- changelogs/fragments/fail2ban-reload.yml | 7 -- ...ea-runner-docker-prune-count-threshold.yml | 9 -- .../gitea-runner-molecule-tooling-removed.yml | 13 --- changelogs/fragments/stale-claims.yml | 5 -- .../system-baseline-check-mode-upgrade.yml | 8 -- .../system-baseline-pve-dist-upgrade.yml | 10 --- ...tem-baseline-reboot-throttle-apt-daily.yml | 11 --- .../system-baseline-unattended-blacklist.yml | 6 -- galaxy.yml | 2 +- 15 files changed, 118 insertions(+), 86 deletions(-) delete mode 100644 changelogs/fragments/ansible-core-2.22-floor.yml delete mode 100644 changelogs/fragments/docker-apt-arch-from-host.yml delete mode 100644 changelogs/fragments/fail2ban-reload.yml delete mode 100644 changelogs/fragments/gitea-runner-docker-prune-count-threshold.yml delete mode 100644 changelogs/fragments/gitea-runner-molecule-tooling-removed.yml delete mode 100644 changelogs/fragments/stale-claims.yml delete mode 100644 changelogs/fragments/system-baseline-check-mode-upgrade.yml delete mode 100644 changelogs/fragments/system-baseline-pve-dist-upgrade.yml delete mode 100644 changelogs/fragments/system-baseline-reboot-throttle-apt-daily.yml delete mode 100644 changelogs/fragments/system-baseline-unattended-blacklist.yml diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 6f4ff02..8531fcd 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,31 @@ mortis.kamino Release Notes .. contents:: Topics +v2.0.0 +====== + +Minor Changes +------------- + +- docker - ``docker_apt_arch`` now defaults to an empty value that derives the apt architecture from the host (``x86_64`` gives ``amd64``, ``aarch64`` gives ``arm64``) instead of always writing ``amd64``, so an arm64 host no longer needs an override. A value set in the inventory is used as before. A host with any other architecture fails the play with a message that names ``docker_apt_arch`` instead of getting an ``amd64`` source line that its apt cannot use; set ``docker_apt_arch`` for such a host. +- fail2ban - the main entry point now reloads Fail2Ban when ``jail.local`` changes instead of restarting it, as ``service_jail`` already did. A restart stops every jail, which flushes its bans out of the firewall until they are restored from Fail2Ban's database, and forgets failures counted toward ``maxretry``; a reload applies the new settings to the running jails. The ``Restart Fail2Ban`` handler is removed: nothing in the role notifies it any more. +- gitea_runner - The Docker prune can bound the image cache by count and by disk use. With ``gitea_runner_docker_prune_keep_per_repository`` above 0 the weekly prune keeps the newest N image IDs of each repository and removes every other image no container uses. With ``gitea_runner_docker_prune_disk_threshold_percent`` set, a timer (``gitea_runner_docker_prune_disk_check_schedule``, hourly by default) runs the count prune and a builder prune capped at ``gitea_runner_docker_prune_builder_keep_storage`` when the filesystem holding the Docker root is fuller than that, behind the same job gate as the weekly prune. Both are off by default. +- system_baseline - Add ``system_baseline_unattended_upgrade_package_blacklist`` (list of regular expressions, default empty). A non-empty list is written to ``/etc/apt/apt.conf.d/90unattended-upgrades-blacklist`` as ``Unattended-Upgrade::Package-Blacklist``, so unattended-upgrades leaves those packages alone on a host whose kernel or drivers must not change. An empty list removes the file. +- system_baseline - Add the input ``system_baseline_apt_daily_timeout``. When set (a systemd time span, for example ``1h``; the default is empty, which leaves the host alone) the role writes a ``TimeoutStartSec`` drop-in for ``apt-daily.service`` and reloads systemd, so a hung apt run is stopped. Tag ``apt-daily-timeout``. +- system_baseline - Add the inputs ``system_baseline_reboot_throttle`` and ``system_baseline_reboot_post_delay`` (whole numbers, default ``0``, which keeps today's behaviour). They are passed to the ``throttle`` and ``post_reboot_delay`` of the reboot task, so a caller can reboot one host at a time and wait before the next. The main flow and the ``reboot`` entry point read them and refuse a negative or non-integer value before anything runs. +- system_baseline - Add the profile key ``apt_upgrade`` (``safe`` or ``dist``) and the input ``system_baseline_apt_upgrade`` that it resolves to. The ``pve`` profile now upgrades packages with ``apt-get dist-upgrade`` (``apt full-upgrade``, which Proxmox VE documents), so packages that a plain upgrade holds back (a new kernel, ``pve-manager``) are installed too; the Ubuntu profiles keep the plain upgrade. A ``pve`` host therefore receives those packages on the next run: set ``system_baseline_reboot_if_required`` to ``false`` first if the role must not reboot it. The ``update`` entry point follows the input when ``system_baseline_system_type`` is set, and so can also remove packages on a ``pve`` host; it stays on the plain upgrade when the type is not set, and now refuses an unknown mode. + +Breaking Changes / Porting Guide +-------------------------------- + +- Raise the minimum ansible-core to 2.22 (controller Python 3.14); 2.19, 2.20 and 2.21 are no longer supported. ``requires_ansible`` and every role's ``min_ansible_version`` now equal the ansible-core minor that CI tests. +- gitea_runner - With ``gitea_runner_molecule_enabled`` the role no longer installs molecule tooling or collections: a job on the ``:host`` label brings its own toolchain in an image and runs it on the host's Docker daemon. The role still registers that label and now installs only ``git`` and ``python3`` on the host, which the job uses there, and no longer needs PyPI or Ansible Galaxy access. The inputs ``gitea_runner_molecule_venv``, ``gitea_runner_molecule_collections_path``, ``gitea_runner_collections_requirements_file``, ``gitea_runner_molecule_version``, ``gitea_runner_molecule_plugins_version``, ``gitea_runner_molecule_ansible_core_version`` and ``gitea_runner_molecule_docker_sdk_version`` are removed; a value set in the inventory is ignored. The role does not delete a venv or collections directory an earlier version installed: remove ``/opt/molecule-venv``, ``/opt/molecule-collections`` (the old defaults) and ``/molecule-requirements.yml`` by hand if nothing else uses them. + +Bugfixes +-------- + +- system_baseline - Do not run the apt upgrade in check mode in the main flow. A package that is only waiting for the next patch run, or a package cache older than an hour, is not drift, but the package module reports both as changed, so a scheduled dry run flagged every host. Autoremove and autoclean are now a task of their own and stay checked; as part of the upgrade call the module did not reach autoclean, so ``apt-get autoclean`` now runs (and may report changed once on a host with stale archives), in the main flow and in the ``update`` entry point. The ``update`` entry point still previews the upgrade in check mode. + v1.11.0 ======= diff --git a/README.md b/README.md index 2ce7eef..6a6abd1 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ An Ansible Collection of reusable, hardened roles for a self-hosted home lab: `sshd`, `system_baseline`, `systemd_hardening`, `traefik`, `ufw` and `user_management`, plus the internal `_binary_update`. Roles still to come are listed under [Roadmap](#roadmap). -Status: roles arrive in waves. Release 1.11.0 holds the `cloudflared`, `docker`, `fail2ban`, `gitea`, `gitea_runner`, `network_interfaces`, `sshd`, `system_baseline`, `systemd_hardening`, `traefik`, `ufw` and `user_management` roles (and the internal `_binary_update`, which `cloudflared`, `gitea`, `gitea_runner` and `traefik` call). +Status: roles arrive in waves. Release 2.0.0 holds the `cloudflared`, `docker`, `fail2ban`, `gitea`, `gitea_runner`, `network_interfaces`, `sshd`, `system_baseline`, `systemd_hardening`, `traefik`, `ufw` and `user_management` roles (and the internal `_binary_update`, which `cloudflared`, `gitea`, `gitea_runner` and `traefik` call). ## Consuming @@ -17,7 +17,7 @@ name (FQCN) only, `mortis.kamino.`: collections: - name: https://git.rkdr.net/mortis/kamino.git type: git - version: v1.11.0 + version: v2.0.0 ``` Its dependencies (`community.general`, `ansible.posix`) are declared in `galaxy.yml`, so diff --git a/changelogs/.plugin-cache.yaml b/changelogs/.plugin-cache.yaml index b59a4cb..108bfd5 100644 --- a/changelogs/.plugin-cache.yaml +++ b/changelogs/.plugin-cache.yaml @@ -71,4 +71,4 @@ plugins: strategy: {} test: {} vars: {} -version: 1.11.0 +version: 2.0.0 diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index b4742c0..05d9442 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -266,3 +266,92 @@ releases: - gitea-role.yml - release-1.9.0.yml release_date: '2026-11-21' + 2.0.0: + changes: + breaking_changes: + - Raise the minimum ansible-core to 2.22 (controller Python 3.14); 2.19, 2.20 + and 2.21 are no longer supported. ``requires_ansible`` and every role's ``min_ansible_version`` + now equal the ansible-core minor that CI tests. + - 'gitea_runner - With ``gitea_runner_molecule_enabled`` the role no longer + installs molecule tooling or collections: a job on the ``:host`` + label brings its own toolchain in an image and runs it on the host''s Docker + daemon. The role still registers that label and now installs only ``git`` + and ``python3`` on the host, which the job uses there, and no longer needs + PyPI or Ansible Galaxy access. The inputs ``gitea_runner_molecule_venv``, + ``gitea_runner_molecule_collections_path``, ``gitea_runner_collections_requirements_file``, + ``gitea_runner_molecule_version``, ``gitea_runner_molecule_plugins_version``, + ``gitea_runner_molecule_ansible_core_version`` and ``gitea_runner_molecule_docker_sdk_version`` + are removed; a value set in the inventory is ignored. The role does not delete + a venv or collections directory an earlier version installed: remove ``/opt/molecule-venv``, + ``/opt/molecule-collections`` (the old defaults) and ``/molecule-requirements.yml`` + by hand if nothing else uses them.' + bugfixes: + - system_baseline - Do not run the apt upgrade in check mode in the main flow. + A package that is only waiting for the next patch run, or a package cache + older than an hour, is not drift, but the package module reports both as changed, + so a scheduled dry run flagged every host. Autoremove and autoclean are now + a task of their own and stay checked; as part of the upgrade call the module + did not reach autoclean, so ``apt-get autoclean`` now runs (and may report + changed once on a host with stale archives), in the main flow and in the ``update`` + entry point. The ``update`` entry point still previews the upgrade in check + mode. + minor_changes: + - docker - ``docker_apt_arch`` now defaults to an empty value that derives the + apt architecture from the host (``x86_64`` gives ``amd64``, ``aarch64`` gives + ``arm64``) instead of always writing ``amd64``, so an arm64 host no longer + needs an override. A value set in the inventory is used as before. A host + with any other architecture fails the play with a message that names ``docker_apt_arch`` + instead of getting an ``amd64`` source line that its apt cannot use; set ``docker_apt_arch`` + for such a host. + - 'fail2ban - the main entry point now reloads Fail2Ban when ``jail.local`` + changes instead of restarting it, as ``service_jail`` already did. A restart + stops every jail, which flushes its bans out of the firewall until they are + restored from Fail2Ban''s database, and forgets failures counted toward ``maxretry``; + a reload applies the new settings to the running jails. The ``Restart Fail2Ban`` + handler is removed: nothing in the role notifies it any more.' + - gitea_runner - The Docker prune can bound the image cache by count and by + disk use. With ``gitea_runner_docker_prune_keep_per_repository`` above 0 the + weekly prune keeps the newest N image IDs of each repository and removes every + other image no container uses. With ``gitea_runner_docker_prune_disk_threshold_percent`` + set, a timer (``gitea_runner_docker_prune_disk_check_schedule``, hourly by + default) runs the count prune and a builder prune capped at ``gitea_runner_docker_prune_builder_keep_storage`` + when the filesystem holding the Docker root is fuller than that, behind the + same job gate as the weekly prune. Both are off by default. + - system_baseline - Add ``system_baseline_unattended_upgrade_package_blacklist`` + (list of regular expressions, default empty). A non-empty list is written + to ``/etc/apt/apt.conf.d/90unattended-upgrades-blacklist`` as ``Unattended-Upgrade::Package-Blacklist``, + so unattended-upgrades leaves those packages alone on a host whose kernel + or drivers must not change. An empty list removes the file. + - system_baseline - Add the input ``system_baseline_apt_daily_timeout``. When + set (a systemd time span, for example ``1h``; the default is empty, which + leaves the host alone) the role writes a ``TimeoutStartSec`` drop-in for ``apt-daily.service`` + and reloads systemd, so a hung apt run is stopped. Tag ``apt-daily-timeout``. + - system_baseline - Add the inputs ``system_baseline_reboot_throttle`` and ``system_baseline_reboot_post_delay`` + (whole numbers, default ``0``, which keeps today's behaviour). They are passed + to the ``throttle`` and ``post_reboot_delay`` of the reboot task, so a caller + can reboot one host at a time and wait before the next. The main flow and + the ``reboot`` entry point read them and refuse a negative or non-integer + value before anything runs. + - 'system_baseline - Add the profile key ``apt_upgrade`` (``safe`` or ``dist``) + and the input ``system_baseline_apt_upgrade`` that it resolves to. The ``pve`` + profile now upgrades packages with ``apt-get dist-upgrade`` (``apt full-upgrade``, + which Proxmox VE documents), so packages that a plain upgrade holds back (a + new kernel, ``pve-manager``) are installed too; the Ubuntu profiles keep the + plain upgrade. A ``pve`` host therefore receives those packages on the next + run: set ``system_baseline_reboot_if_required`` to ``false`` first if the + role must not reboot it. The ``update`` entry point follows the input when + ``system_baseline_system_type`` is set, and so can also remove packages on + a ``pve`` host; it stays on the plain upgrade when the type is not set, and + now refuses an unknown mode.' + fragments: + - ansible-core-2.22-floor.yml + - docker-apt-arch-from-host.yml + - fail2ban-reload.yml + - gitea-runner-docker-prune-count-threshold.yml + - gitea-runner-molecule-tooling-removed.yml + - stale-claims.yml + - system-baseline-check-mode-upgrade.yml + - system-baseline-pve-dist-upgrade.yml + - system-baseline-reboot-throttle-apt-daily.yml + - system-baseline-unattended-blacklist.yml + release_date: '2026-11-24' diff --git a/changelogs/fragments/ansible-core-2.22-floor.yml b/changelogs/fragments/ansible-core-2.22-floor.yml deleted file mode 100644 index 72de520..0000000 --- a/changelogs/fragments/ansible-core-2.22-floor.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -breaking_changes: - - >- - Raise the minimum ansible-core to 2.22 (controller Python 3.14); 2.19, 2.20 and 2.21 - are no longer supported. ``requires_ansible`` and every role's ``min_ansible_version`` - now equal the ansible-core minor that CI tests. diff --git a/changelogs/fragments/docker-apt-arch-from-host.yml b/changelogs/fragments/docker-apt-arch-from-host.yml deleted file mode 100644 index 225fe8c..0000000 --- a/changelogs/fragments/docker-apt-arch-from-host.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -minor_changes: - - >- - docker - ``docker_apt_arch`` now defaults to an empty value that derives the apt architecture from the host (``x86_64`` gives ``amd64``, - ``aarch64`` gives ``arm64``) instead of always writing ``amd64``, so an arm64 host no longer needs an override. A value set in the inventory - is used as before. A host with any other architecture fails the play with a message that names ``docker_apt_arch`` instead of getting an - ``amd64`` source line that its apt cannot use; set ``docker_apt_arch`` for such a host. diff --git a/changelogs/fragments/fail2ban-reload.yml b/changelogs/fragments/fail2ban-reload.yml deleted file mode 100644 index a0be8d3..0000000 --- a/changelogs/fragments/fail2ban-reload.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -minor_changes: - - >- - fail2ban - the main entry point now reloads Fail2Ban when ``jail.local`` changes instead of restarting it, as ``service_jail`` - already did. A restart stops every jail, which flushes its bans out of the firewall until they are restored from Fail2Ban's - database, and forgets failures counted toward ``maxretry``; a reload applies the new settings to the running jails. The - ``Restart Fail2Ban`` handler is removed: nothing in the role notifies it any more. diff --git a/changelogs/fragments/gitea-runner-docker-prune-count-threshold.yml b/changelogs/fragments/gitea-runner-docker-prune-count-threshold.yml deleted file mode 100644 index af9bb56..0000000 --- a/changelogs/fragments/gitea-runner-docker-prune-count-threshold.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -minor_changes: - - >- - gitea_runner - The Docker prune can bound the image cache by count and by disk use. With - ``gitea_runner_docker_prune_keep_per_repository`` above 0 the weekly prune keeps the newest N image IDs of each - repository and removes every other image no container uses. With ``gitea_runner_docker_prune_disk_threshold_percent`` - set, a timer (``gitea_runner_docker_prune_disk_check_schedule``, hourly by default) runs the count prune and a builder - prune capped at ``gitea_runner_docker_prune_builder_keep_storage`` when the filesystem holding the Docker root is - fuller than that, behind the same job gate as the weekly prune. Both are off by default. diff --git a/changelogs/fragments/gitea-runner-molecule-tooling-removed.yml b/changelogs/fragments/gitea-runner-molecule-tooling-removed.yml deleted file mode 100644 index 6eca460..0000000 --- a/changelogs/fragments/gitea-runner-molecule-tooling-removed.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -breaking_changes: - - >- - gitea_runner - With ``gitea_runner_molecule_enabled`` the role no longer installs molecule tooling or collections: a job on - the ``:host`` label brings its own toolchain in an image and runs it on the host's Docker - daemon. The role still registers that label and now installs only ``git`` and ``python3`` on the host, which the job uses - there, and no longer needs PyPI or Ansible Galaxy access. The inputs ``gitea_runner_molecule_venv``, - ``gitea_runner_molecule_collections_path``, ``gitea_runner_collections_requirements_file``, - ``gitea_runner_molecule_version``, ``gitea_runner_molecule_plugins_version``, - ``gitea_runner_molecule_ansible_core_version`` and ``gitea_runner_molecule_docker_sdk_version`` are removed; a value set - in the inventory is ignored. The role does not delete a venv or collections directory an earlier version installed: - remove ``/opt/molecule-venv``, ``/opt/molecule-collections`` (the old defaults) and - ``/molecule-requirements.yml`` by hand if nothing else uses them. diff --git a/changelogs/fragments/stale-claims.yml b/changelogs/fragments/stale-claims.yml deleted file mode 100644 index f08681f..0000000 --- a/changelogs/fragments/stale-claims.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -trivial: - - >- - Name only the roles that ship in the README and the Galaxy description, and drop the - licence texts, NOTICE and REUSE entries of roles that are not in the Collection. diff --git a/changelogs/fragments/system-baseline-check-mode-upgrade.yml b/changelogs/fragments/system-baseline-check-mode-upgrade.yml deleted file mode 100644 index eef501e..0000000 --- a/changelogs/fragments/system-baseline-check-mode-upgrade.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -bugfixes: - - >- - system_baseline - Do not run the apt upgrade in check mode in the main flow. A package that is only waiting for the next patch run, or a - package cache older than an hour, is not drift, but the package module reports both as changed, so a scheduled dry run flagged every - host. Autoremove and autoclean are now a task of their own and stay checked; as part of the upgrade call the module did not reach - autoclean, so ``apt-get autoclean`` now runs (and may report changed once on a host with stale archives), in the main flow and in the - ``update`` entry point. The ``update`` entry point still previews the upgrade in check mode. diff --git a/changelogs/fragments/system-baseline-pve-dist-upgrade.yml b/changelogs/fragments/system-baseline-pve-dist-upgrade.yml deleted file mode 100644 index 3c74180..0000000 --- a/changelogs/fragments/system-baseline-pve-dist-upgrade.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -minor_changes: - - >- - system_baseline - Add the profile key ``apt_upgrade`` (``safe`` or ``dist``) and the input ``system_baseline_apt_upgrade`` that it resolves - to. The ``pve`` profile now upgrades packages with ``apt-get dist-upgrade`` - (``apt full-upgrade``, which Proxmox VE documents), so packages that a plain upgrade - holds back (a new kernel, ``pve-manager``) are installed too; the Ubuntu profiles keep the plain upgrade. A ``pve`` host therefore receives - those packages on the next run: set ``system_baseline_reboot_if_required`` to ``false`` first if the role must not reboot it. The ``update`` - entry point follows the input when ``system_baseline_system_type`` is set, and so can also remove packages on a ``pve`` host; it stays on - the plain upgrade when the type is not set, and now refuses an unknown mode. diff --git a/changelogs/fragments/system-baseline-reboot-throttle-apt-daily.yml b/changelogs/fragments/system-baseline-reboot-throttle-apt-daily.yml deleted file mode 100644 index 34a0bb9..0000000 --- a/changelogs/fragments/system-baseline-reboot-throttle-apt-daily.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -minor_changes: - - >- - system_baseline - Add the inputs ``system_baseline_reboot_throttle`` and ``system_baseline_reboot_post_delay`` (whole numbers, default - ``0``, which keeps today's behaviour). They are passed to the ``throttle`` and ``post_reboot_delay`` of the reboot task, so a caller can - reboot one host at a time and wait before the next. The main flow and the ``reboot`` entry point read them and refuse a negative or - non-integer value before anything runs. - - >- - system_baseline - Add the input ``system_baseline_apt_daily_timeout``. When set (a systemd time span, for example ``1h``; the default is - empty, which leaves the host alone) the role writes a ``TimeoutStartSec`` drop-in for ``apt-daily.service`` and reloads systemd, so a hung - apt run is stopped. Tag ``apt-daily-timeout``. diff --git a/changelogs/fragments/system-baseline-unattended-blacklist.yml b/changelogs/fragments/system-baseline-unattended-blacklist.yml deleted file mode 100644 index 374ab00..0000000 --- a/changelogs/fragments/system-baseline-unattended-blacklist.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -minor_changes: - - >- - system_baseline - Add ``system_baseline_unattended_upgrade_package_blacklist`` (list of regular expressions, default empty). A non-empty - list is written to ``/etc/apt/apt.conf.d/90unattended-upgrades-blacklist`` as ``Unattended-Upgrade::Package-Blacklist``, so unattended-upgrades - leaves those packages alone on a host whose kernel or drivers must not change. An empty list removes the file. diff --git a/galaxy.yml b/galaxy.yml index 67d7e8a..5ad717c 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -1,7 +1,7 @@ --- namespace: mortis name: kamino -version: 1.11.0 +version: 2.0.0 readme: README.md authors: - Defame1297