feat(system_baseline): add a per-host package blacklist for unattended-upgrades
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:
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
|
||||
Reference in new issue
Block a user