For a consumer that stops patching Proxmox nodes from its provisioning chain and moves patching to an operator-run playbook (full upgrade and rolling reboot). Unattended-upgrades stays on for the nodes, limited to Debian.
Changes
system_baseline_update (bool, default true, so nothing changes by default). With false, the main flow skips tasks/update.yml. The tasks_from: update entry point does not read it, because calling that entry point is an explicit request to update. The reboot check still runs, so a host whose patch flow owns the reboot also sets system_baseline_reboot_if_required: false. This is documented in the README and argument_specs.
Profile key unattended_upgrade_origins, resolved as system_baseline_unattended_upgrade_origins (| default([]), so a system_baseline_profiles written without the key still works):
With a non-empty list, the role writes /etc/apt/apt.conf.d/90unattended-upgrades-origins. That file runs #clear Unattended-Upgrade::Allowed-Origins; and #clear Unattended-Upgrade::Origins-Pattern;, then sets only the listed patterns.
An empty list removes the file.
Why #clear: apt appends list entries across apt.conf.d files, so a drop-in that only lists origins would add to Debian's 50unattended-upgrades and could never narrow it. The role does not edit the origin lists in 50unattended-upgrades either. A file that sorts after 90 could still add origins, and the README says so.
pve pins exactly Debian 13's default set: origin=Debian,codename=${distro_codename},label=Debian, ...label=Debian-Security and origin=Debian,codename=${distro_codename}-security,label=Debian-Security. The Proxmox repository is never included.
ubuntu_lxc and ubuntu_vm get [], so they are unchanged.
validate.yml refuses an entry that is not a list of non-empty one-line strings, or that holds a double quote or a backslash. Either would break out of the quoted apt.conf string.
argument_specs, README and a minor_changes fragment are updated. There is no galaxy.yml bump; the release is a separate PR.
Molecule:
converge asserts the resolved pve origins (three entries, none mention Proxmox), the system_baseline_update default and [] for ubuntu_vm.
verify runs tasks_from: unattended_upgrades with the pve profile on the Ubuntu container and checks apt-config dump. Only the three patterns may remain, and there must be no Allowed-Origins entries. Ubuntu's own file sets Allowed-Origins, so passing shows that #clear removes the earlier entries. verify then switches back to ubuntu_lxc and checks that the drop-in is gone and Ubuntu's origins are back.
Verified
All commit hooks pass (yamllint, ansible-lint, REUSE, changelog lint, gitleaks, Conventional Commits). The pre-push ansible-test sanity passes too.
A scratch play on localhost only (no hosts touched):
The pve and ubuntu_vm profiles resolve as expected.
The validation refuses a"b, a\b, a newline, an empty string, a bare string, a non-string entry and a list with one bad entry. It accepts the pve defaults and [].
The template renders as intended.
apt-config dump against a scratch config dir: with a 50unattended-upgrades holding Proxmox entries in both lists, the rendered drop-in leaves exactly the three Debian patterns and no Allowed-Origins entries. Without the drop-in, the Proxmox entries remain.
Not verified
Molecule did not run locally (there is no container runtime). The new verify play runs in CI only.
The system_baseline_update: false skip has no behavioural test, because the scenario already skips the update tag. Only its default is asserted.
Nothing was run against a real Proxmox node. Running unattended-upgrades --dry-run --debug on a node after the role runs is the live check.
For a consumer that stops patching Proxmox nodes from its provisioning chain and moves patching to an operator-run playbook (full upgrade and rolling reboot). Unattended-upgrades stays on for the nodes, limited to Debian.
## Changes
- **`system_baseline_update`** (bool, default `true`, so nothing changes by default). With `false`, the main flow skips `tasks/update.yml`. The `tasks_from: update` entry point does **not** read it, because calling that entry point is an explicit request to update. The reboot check still runs, so a host whose patch flow owns the reboot also sets `system_baseline_reboot_if_required: false`. This is documented in the README and argument_specs.
- **Profile key `unattended_upgrade_origins`**, resolved as `system_baseline_unattended_upgrade_origins` (`| default([])`, so a `system_baseline_profiles` written without the key still works):
- With a non-empty list, the role writes `/etc/apt/apt.conf.d/90unattended-upgrades-origins`. That file runs `#clear Unattended-Upgrade::Allowed-Origins;` and `#clear Unattended-Upgrade::Origins-Pattern;`, then sets only the listed patterns.
- An empty list removes the file.
- Why `#clear`: apt appends list entries across `apt.conf.d` files, so a drop-in that only lists origins would add to Debian's `50unattended-upgrades` and could never narrow it. The role does not edit the origin lists in `50unattended-upgrades` either. A file that sorts after `90` could still add origins, and the README says so.
- `pve` pins exactly Debian 13's default set: `origin=Debian,codename=${distro_codename},label=Debian`, `...label=Debian-Security` and `origin=Debian,codename=${distro_codename}-security,label=Debian-Security`. The Proxmox repository is never included.
- `ubuntu_lxc` and `ubuntu_vm` get `[]`, so they are unchanged.
- `validate.yml` refuses an entry that is not a list of non-empty one-line strings, or that holds a double quote or a backslash. Either would break out of the quoted apt.conf string.
- argument_specs, README and a `minor_changes` fragment are updated. There is no `galaxy.yml` bump; the release is a separate PR.
- Molecule:
- converge asserts the resolved pve origins (three entries, none mention Proxmox), the `system_baseline_update` default and `[]` for ubuntu_vm.
- verify runs `tasks_from: unattended_upgrades` with the pve profile on the Ubuntu container and checks `apt-config dump`. Only the three patterns may remain, and there must be no `Allowed-Origins` entries. Ubuntu's own file sets `Allowed-Origins`, so passing shows that `#clear` removes the earlier entries. verify then switches back to ubuntu_lxc and checks that the drop-in is gone and Ubuntu's origins are back.
## Verified
- All commit hooks pass (yamllint, ansible-lint, REUSE, changelog lint, gitleaks, Conventional Commits). The pre-push `ansible-test sanity` passes too.
- A scratch play on localhost only (no hosts touched):
- The pve and ubuntu_vm profiles resolve as expected.
- The validation refuses `a"b`, `a\b`, a newline, an empty string, a bare string, a non-string entry and a list with one bad entry. It accepts the pve defaults and `[]`.
- The template renders as intended.
- `apt-config dump` against a scratch config dir: with a `50unattended-upgrades` holding Proxmox entries in both lists, the rendered drop-in leaves exactly the three Debian patterns and no `Allowed-Origins` entries. Without the drop-in, the Proxmox entries remain.
## Not verified
- Molecule did not run locally (there is no container runtime). The new verify play runs in CI only.
- The `system_baseline_update: false` skip has no behavioural test, because the scenario already skips the `update` tag. Only its default is asserted.
- Nothing was run against a real Proxmox node. Running `unattended-upgrades --dry-run --debug` on a node after the role runs is the live check.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
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
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
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
For a consumer that stops patching Proxmox nodes from its provisioning chain and moves patching to an operator-run playbook (full upgrade and rolling reboot). Unattended-upgrades stays on for the nodes, limited to Debian.
Changes
system_baseline_update(bool, defaulttrue, so nothing changes by default). Withfalse, the main flow skipstasks/update.yml. Thetasks_from: updateentry point does not read it, because calling that entry point is an explicit request to update. The reboot check still runs, so a host whose patch flow owns the reboot also setssystem_baseline_reboot_if_required: false. This is documented in the README and argument_specs.unattended_upgrade_origins, resolved assystem_baseline_unattended_upgrade_origins(| default([]), so asystem_baseline_profileswritten without the key still works):/etc/apt/apt.conf.d/90unattended-upgrades-origins. That file runs#clear Unattended-Upgrade::Allowed-Origins;and#clear Unattended-Upgrade::Origins-Pattern;, then sets only the listed patterns.#clear: apt appends list entries acrossapt.conf.dfiles, so a drop-in that only lists origins would add to Debian's50unattended-upgradesand could never narrow it. The role does not edit the origin lists in50unattended-upgradeseither. A file that sorts after90could still add origins, and the README says so.pvepins exactly Debian 13's default set:origin=Debian,codename=${distro_codename},label=Debian,...label=Debian-Securityandorigin=Debian,codename=${distro_codename}-security,label=Debian-Security. The Proxmox repository is never included.ubuntu_lxcandubuntu_vmget[], so they are unchanged.validate.ymlrefuses an entry that is not a list of non-empty one-line strings, or that holds a double quote or a backslash. Either would break out of the quoted apt.conf string.minor_changesfragment are updated. There is nogalaxy.ymlbump; the release is a separate PR.system_baseline_updatedefault and[]for ubuntu_vm.tasks_from: unattended_upgradeswith the pve profile on the Ubuntu container and checksapt-config dump. Only the three patterns may remain, and there must be noAllowed-Originsentries. Ubuntu's own file setsAllowed-Origins, so passing shows that#clearremoves the earlier entries. verify then switches back to ubuntu_lxc and checks that the drop-in is gone and Ubuntu's origins are back.Verified
ansible-test sanitypasses too.a"b,a\b, a newline, an empty string, a bare string, a non-string entry and a list with one bad entry. It accepts the pve defaults and[].apt-config dumpagainst a scratch config dir: with a50unattended-upgradesholding Proxmox entries in both lists, the rendered drop-in leaves exactly the three Debian patterns and noAllowed-Originsentries. Without the drop-in, the Proxmox entries remain.Not verified
system_baseline_update: falseskip has no behavioural test, because the scenario already skips theupdatetag. Only its default is asserted.unattended-upgrades --dry-run --debugon a node after the role runs is the live check.🤖 Generated with Claude Code