feat(system_baseline): add a per-host package blacklist for unattended-upgrades
Build / build (pull_request) Successful in 19s
Lint / lint (pull_request) Successful in 1m21s
Molecule / molecule (pull_request) Successful in 2m8s

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
This commit is contained in:
Dragonish committed 2026-11-23 18:22:24 +00:00
1 parent 8e512416e9
commit e4c69dfdd8
10 files changed
+185

No files matched your search

@@ -0,0 +1,18 @@
---
# One refusal: the role must stop on validation, before it changes anything, with a message that names the variable.
- name: Run the role with a bad package blacklist
block:
- name: Include system_baseline
ansible.builtin.include_role:
name: mortis.kamino.system_baseline
vars:
system_baseline_system_type: ubuntu_lxc
system_baseline_unattended_upgrade_package_blacklist: "{{ system_baseline_refused_blacklist }}"
- name: Unreachable when validation works
ansible.builtin.fail:
msg: system_baseline ran with an invalid package blacklist
rescue:
- name: The validation stopped the play
ansible.builtin.assert:
that: "'system_baseline_unattended_upgrade_package_blacklist must be' in ansible_failed_result.msg | default('')"
quiet: true