New profile key apt_upgrade (safe or dist), resolved to system_baseline_apt_upgrade. The pve profile uses dist, so the update step runs apt-get dist-upgrade (the same as apt full-upgrade) on a Proxmox VE host; ubuntu_lxc and ubuntu_vm keep the plain upgrade. tasks/update.yml passes the input to the package module (safe is the module's name for the plain upgrade, apt-get upgrade --with-new-pkgs, which is what upgrade: true ran before). The value is validated (safe or dist, anything else stops the run with a message that names the input), and a consumer can set system_baseline_apt_upgrade or the profile key per host.
A correction to the issue text: it said a safe upgrade never installs a new package. The apt module's safe mode is upgrade --with-new-pkgs, which does install new dependencies. The real difference is that dist-upgrade can also remove packages an update replaces, which is what a safe upgrade holds back on Proxmox. The Proxmox VE documentation (System Software Updates) updates a node with apt full-upgrade and warns that apt upgrade "may result in a partially upgraded or broken package state", because full-upgrade "can also remove existing packages to satisfy dependencies". The README says it that way. The apt dist-upgrade wording in the example I added to the blacklist section in #325 is corrected here to apt full-upgrade.
Behaviour changes
A pve host that was upgraded with safe until now also gets the packages a safe upgrade held back (a new kernel, pve-manager and its dependencies) on the next run. That can restart Proxmox services, and a new kernel needs a reboot. system_baseline_reboot_if_required defaults to true, so the README tells a consumer to set it to false before applying the role to a hypervisor they want to reboot themselves. I did not change that default (the issue asks).
The update entry point, a supported interface, follows the same input and now checks it itself (it does not run validate.yml): with system_baseline_system_type: pve it now upgrades with dist. It does not require a system type, so without one it stays on safe (the derived input is guarded), and nothing fails for a caller that never sets one. Is following the profile the behaviour you want for the entry point?
Verified
The resolution, with Ansible's own engine, seven cases: pve gives dist, ubuntu_lxc and ubuntu_vm give safe, no system type gives safe, an inventory-style system_baseline_apt_upgrade: dist wins on ubuntu_lxc, a profile override and an explicit safe win on pve; the update entry point refuses full at once (without the check it would call aptitude). The validation rule accepts safe and dist and refuses full, yes and an empty string.
The apt module accepts safe and dist for upgrade (read in the installed apt.py).
All commit-stage hooks pass (yamllint, ansible-lint, REUSE, changelog lint, Conventional Commit); --syntax-check passes on the converge playbook.
An independent review of the diff, its findings applied.
Molecule additions: the resolved input is asserted for pve (dist) and ubuntu_vm (safe), a consumer override of the flat input is asserted, and a refusal case for full in the main flow and one for the update entry point.
Not verified
Molecule itself (CI only) and the dist-upgrade on a real Proxmox host: the update tag is skipped in Molecule (no privileged container, and the image is not a Proxmox host), so CI checks only that the profiles resolve and the value is validated. I did not run Kamino's role on a Proxmox node; in my own role a node has been upgraded with dist for months.
I confirm third-party material is recorded in NOTICE and REUSE.toml, or there is none.
Assisted-by: Claude Code
## What and why
Closes #329
New profile key `apt_upgrade` (`safe` or `dist`), resolved to `system_baseline_apt_upgrade`. The `pve` profile uses `dist`, so the update step runs `apt-get dist-upgrade` (the same as `apt full-upgrade`) on a Proxmox VE host; `ubuntu_lxc` and `ubuntu_vm` keep the plain upgrade. `tasks/update.yml` passes the input to the package module (`safe` is the module's name for the plain upgrade, `apt-get upgrade --with-new-pkgs`, which is what `upgrade: true` ran before). The value is validated (`safe` or `dist`, anything else stops the run with a message that names the input), and a consumer can set `system_baseline_apt_upgrade` or the profile key per host.
**A correction to the issue text:** it said a safe upgrade never installs a new package. The apt module's safe mode is `upgrade --with-new-pkgs`, which does install new dependencies. The real difference is that `dist-upgrade` can also remove packages an update replaces, which is what a safe upgrade holds back on Proxmox. The Proxmox VE documentation (System Software Updates) updates a node with `apt full-upgrade` and warns that `apt upgrade` "may result in a partially upgraded or broken package state", because `full-upgrade` "can also remove existing packages to satisfy dependencies". The README says it that way. The `apt dist-upgrade` wording in the example I added to the blacklist section in #325 is corrected here to `apt full-upgrade`.
**Behaviour changes**
- A `pve` host that was upgraded with `safe` until now also gets the packages a safe upgrade held back (a new kernel, `pve-manager` and its dependencies) on the next run. That can restart Proxmox services, and a new kernel needs a reboot. `system_baseline_reboot_if_required` defaults to `true`, so the README tells a consumer to set it to `false` before applying the role to a hypervisor they want to reboot themselves. I did not change that default (the issue asks).
- The `update` entry point, a supported interface, follows the same input and now checks it itself (it does not run `validate.yml`): with `system_baseline_system_type: pve` it now upgrades with `dist`. It does not require a system type, so without one it stays on `safe` (the derived input is guarded), and nothing fails for a caller that never sets one. Is following the profile the behaviour you want for the entry point?
## Verified
- The resolution, with Ansible's own engine, seven cases: `pve` gives `dist`, `ubuntu_lxc` and `ubuntu_vm` give `safe`, no system type gives `safe`, an inventory-style `system_baseline_apt_upgrade: dist` wins on `ubuntu_lxc`, a profile override and an explicit `safe` win on `pve`; the update entry point refuses `full` at once (without the check it would call aptitude). The validation rule accepts `safe` and `dist` and refuses `full`, `yes` and an empty string.
- The apt module accepts `safe` and `dist` for `upgrade` (read in the installed `apt.py`).
- All commit-stage hooks pass (yamllint, ansible-lint, REUSE, changelog lint, Conventional Commit); `--syntax-check` passes on the converge playbook.
- An independent review of the diff, its findings applied.
- Molecule additions: the resolved input is asserted for `pve` (`dist`) and `ubuntu_vm` (`safe`), a consumer override of the flat input is asserted, and a refusal case for `full` in the main flow and one for the update entry point.
## Not verified
- Molecule itself (CI only) and the dist-upgrade on a real Proxmox host: the `update` tag is skipped in Molecule (no privileged container, and the image is not a Proxmox host), so CI checks only that the profiles resolve and the value is validated. I did not run Kamino's role on a Proxmox node; in my own role a node has been upgraded with `dist` for months.
---
- [x] I confirm third-party material is recorded in `NOTICE` and `REUSE.toml`, or there is none.
Assisted-by: Claude Code
New profile key apt_upgrade (safe or dist) resolved to
system_baseline_apt_upgrade; the pve profile uses dist, the Ubuntu
profiles keep the plain upgrade. The update entry point follows it when
system_baseline_system_type is set.
Assisted-by: Claude Code
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.
What and why
Closes #329
New profile key
apt_upgrade(safeordist), resolved tosystem_baseline_apt_upgrade. Thepveprofile usesdist, so the update step runsapt-get dist-upgrade(the same asapt full-upgrade) on a Proxmox VE host;ubuntu_lxcandubuntu_vmkeep the plain upgrade.tasks/update.ymlpasses the input to the package module (safeis the module's name for the plain upgrade,apt-get upgrade --with-new-pkgs, which is whatupgrade: trueran before). The value is validated (safeordist, anything else stops the run with a message that names the input), and a consumer can setsystem_baseline_apt_upgradeor the profile key per host.A correction to the issue text: it said a safe upgrade never installs a new package. The apt module's safe mode is
upgrade --with-new-pkgs, which does install new dependencies. The real difference is thatdist-upgradecan also remove packages an update replaces, which is what a safe upgrade holds back on Proxmox. The Proxmox VE documentation (System Software Updates) updates a node withapt full-upgradeand warns thatapt upgrade"may result in a partially upgraded or broken package state", becausefull-upgrade"can also remove existing packages to satisfy dependencies". The README says it that way. Theapt dist-upgradewording in the example I added to the blacklist section in #325 is corrected here toapt full-upgrade.Behaviour changes
pvehost that was upgraded withsafeuntil now also gets the packages a safe upgrade held back (a new kernel,pve-managerand its dependencies) on the next run. That can restart Proxmox services, and a new kernel needs a reboot.system_baseline_reboot_if_requireddefaults totrue, so the README tells a consumer to set it tofalsebefore applying the role to a hypervisor they want to reboot themselves. I did not change that default (the issue asks).updateentry point, a supported interface, follows the same input and now checks it itself (it does not runvalidate.yml): withsystem_baseline_system_type: pveit now upgrades withdist. It does not require a system type, so without one it stays onsafe(the derived input is guarded), and nothing fails for a caller that never sets one. Is following the profile the behaviour you want for the entry point?Verified
pvegivesdist,ubuntu_lxcandubuntu_vmgivesafe, no system type givessafe, an inventory-stylesystem_baseline_apt_upgrade: distwins onubuntu_lxc, a profile override and an explicitsafewin onpve; the update entry point refusesfullat once (without the check it would call aptitude). The validation rule acceptssafeanddistand refusesfull,yesand an empty string.safeanddistforupgrade(read in the installedapt.py).--syntax-checkpasses on the converge playbook.pve(dist) andubuntu_vm(safe), a consumer override of the flat input is asserted, and a refusal case forfullin the main flow and one for the update entry point.Not verified
updatetag is skipped in Molecule (no privileged container, and the image is not a Proxmox host), so CI checks only that the profiles resolve and the value is validated. I did not run Kamino's role on a Proxmox node; in my own role a node has been upgraded withdistfor months.NOTICEandREUSE.toml, or there is none.Assisted-by: Claude Code