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
This commit is contained in:
Defame1297andClaude Opus 5.5 committed 2026-11-14 22:11:36 +00:00
1 parent 8a3c7d0fc2
commit 52d06204bb
10 files changed
+181 -7

No files matched your search

+19
View File
@@ -4,6 +4,9 @@
system_baseline_timezone: "Etc/UTC"
system_baseline_locale: "en_US.UTF-8"
system_baseline_reboot_if_required: true
# Run the package update (tasks/update.yml) in the main flow. false skips it, for hosts that are patched by a separate,
# operator-run flow; the tasks_from: update entry point does not read it.
system_baseline_update: true
# Upper bound of the persistent journal (journald SystemMaxUse); older archived files are removed above it.
system_baseline_journal_max_use: 200M
# Attach an interactive SSH login to a tmux session (see tasks/tmux.yml). Off by default: it changes what every login does.
@@ -70,6 +73,14 @@ system_baseline_profiles:
"Unattended-Upgrade::Remove-Unused-Dependencies": true
"Unattended-Upgrade::MinimalSteps": true
# The only origins unattended-upgrades may install from: Debian's point releases and Debian-Security, never the
# Proxmox repository. This is Debian 13's own default set, pinned so that a future default cannot widen it.
# ${distro_codename} is expanded by unattended-upgrades, not by Ansible. [] leaves the distribution default alone.
unattended_upgrade_origins:
- "origin=Debian,codename=${distro_codename},label=Debian"
- "origin=Debian,codename=${distro_codename},label=Debian-Security"
- "origin=Debian,codename=${distro_codename}-security,label=Debian-Security"
sysctl_hardening:
- { name: "net.ipv4.tcp_syncookies", value: 1 }
- { name: "kernel.randomize_va_space", value: 2 }
@@ -129,6 +140,9 @@ system_baseline_profiles:
"Unattended-Upgrade::Remove-Unused-Dependencies": true
"Unattended-Upgrade::MinimalSteps": true
# Not pinned: the distribution default origins apply.
unattended_upgrade_origins: []
sysctl_hardening:
- { name: "net.ipv4.tcp_syncookies", value: 1 }
- { name: "net.ipv4.conf.all.accept_source_route", value: 0 }
@@ -184,6 +198,9 @@ system_baseline_profiles:
"Unattended-Upgrade::Remove-Unused-Dependencies": true
"Unattended-Upgrade::MinimalSteps": true
# Not pinned: the distribution default origins apply.
unattended_upgrade_origins: []
sysctl_hardening:
- { name: "net.ipv4.tcp_syncookies", value: 1 }
- { name: "kernel.randomize_va_space", value: 2 }
@@ -211,5 +228,7 @@ system_baseline_essential_packages: "{{ system_baseline_profile.essential_packag
system_baseline_remove_packages: "{{ system_baseline_profile.remove_packages }}"
system_baseline_apt_periodic_settings: "{{ system_baseline_profile.apt_periodic_settings }}"
system_baseline_unattended_upgrade_settings: "{{ system_baseline_profile.unattended_upgrade_settings }}"
# default([]): a system_baseline_profiles written before this key existed keeps the distribution default.
system_baseline_unattended_upgrade_origins: "{{ system_baseline_profile.unattended_upgrade_origins | default([]) }}"
system_baseline_sysctl_hardening: "{{ system_baseline_profile.sysctl_hardening }}"
system_baseline_secure_tmp_mounts: "{{ system_baseline_profile.secure_tmp_mounts }}"