system_baseline picks a package list per system type (system_baseline_profiles.<type>.essential_packages and .remove_packages). A consumer who wants one more package than the profile (or one more removal) has no way to say only that:
system_baseline_essential_packages and system_baseline_remove_packages are flat inputs that replace the whole resolved list. The consumer must copy the profile's full list into inventory and keep it in step with every release that changes the profile.
system_baseline_profile_overrides merges recursively into the profile, but the defaults file and argument_specs.yml both say lists inside it are replaced, not merged. So profile_overrides: {ubuntu_vm: {essential_packages: [jq]}} also drops every package the profile installs today.
Replacing the list silently has side effects: tmux autostart is installed only when tmux is in the resolved package list, and the unattended-upgrades task runs only when unattended-upgrades is in it. A consumer who replaces the list and forgets either loses that behaviour without an error.
Out of scope: package versions, per-package state other than present/absent, repositories, and changing the profiles' own lists.
Proposal
Two optional list inputs, empty by default, appended to the resolved lists:
system_baseline_extra_packages (list of str, default []): installed in addition to the resolved essential_packages.
system_baseline_extra_remove_packages (list of str, default []): removed in addition to the resolved remove_packages.
Naming follows the role's existing system_baseline_<thing> inputs (system_baseline_essential_packages, system_baseline_remove_packages). The base inputs keep their meaning (a flat input still replaces the profile list); the extras are added on top of whichever list results.
Mechanics, in defaults/main.yml next to the other resolved inputs, so consumers of the existing names see no change:
and tasks/packages.yml installs system_baseline_essential_packages + system_baseline_extra_packages | unique and loops over system_baseline_remove_packages + system_baseline_extra_remove_packages | unique. The two places that test list membership (tmux in tasks/tmux.yml, unattended-upgrades in tasks/main.yml) should test the combined list, so that an extra tmux behaves like a profile tmux.
Questions for the maintainer: (1) should a package named in both the extras install list and the remove list (base or extra) be refused in tasks/validate.yml? The proposal says yes, one assert. (2) Is a type: list/elements: str input with a default: [] in argument_specs.yml and in defaults/main.yml the preferred shape (roles/AGENTS.md "argument_specs")?
Acceptance criteria
system_baseline_extra_packages and system_baseline_extra_remove_packages exist in defaults/main.yml (default []) and in meta/argument_specs.yml with type: list, elements: str, a description and the same default. Check: ansible-lint (schema role-arg-spec) and ansible-doc -t role mortis.kamino.system_baseline show both.
With both left at default, the packages installed and removed are identical to v3.0.0 for each of ubuntu_vm, ubuntu_lxc and pve. Check: the existing molecule default scenario still passes unchanged.
With system_baseline_extra_packages: [jq] on ubuntu_lxc, jq is installed together with every package of the profile. Check: molecule verify asserts jq and curl (a profile package) are installed.
With system_baseline_extra_remove_packages: [<pkg>], that package is purged when installed, in addition to the profile's removals. Check: molecule verify asserts it is absent.
A package named in both the install side and the remove side stops the run before any change, naming the input. Check: a molecule "refuse" scenario in the style of refuse_reboot.yml.
An extra tmux or unattended-upgrades when a flat system_baseline_essential_packages override omitted it still enables the matching task. Check: molecule scenario asserts /etc/profile.d/tmux-autostart.sh exists.
The README variables table and "Role interface" note list both inputs; a minor_changes fragment exists in changelogs/fragments/. Check: pre-commit run --all-files (antsibull-changelog-lint).
This is the contributor's own code and is offered under GPL-3.0-or-later, the Collection's licence.
Assisted-by: Claude Code
## Problem
`system_baseline` picks a package list per system type (`system_baseline_profiles.<type>.essential_packages` and `.remove_packages`). A consumer who wants one more package than the profile (or one more removal) has no way to say only that:
- `system_baseline_essential_packages` and `system_baseline_remove_packages` are flat inputs that replace the whole resolved list. The consumer must copy the profile's full list into inventory and keep it in step with every release that changes the profile.
- `system_baseline_profile_overrides` merges recursively into the profile, but the defaults file and `argument_specs.yml` both say lists inside it are replaced, not merged. So `profile_overrides: {ubuntu_vm: {essential_packages: [jq]}}` also drops every package the profile installs today.
- Replacing the list silently has side effects: `tmux` autostart is installed only when `tmux` is in the resolved package list, and the unattended-upgrades task runs only when `unattended-upgrades` is in it. A consumer who replaces the list and forgets either loses that behaviour without an error.
Out of scope: package versions, per-package state other than present/absent, repositories, and changing the profiles' own lists.
## Proposal
Two optional list inputs, empty by default, appended to the resolved lists:
- `system_baseline_extra_packages` (list of str, default `[]`): installed in addition to the resolved `essential_packages`.
- `system_baseline_extra_remove_packages` (list of str, default `[]`): removed in addition to the resolved `remove_packages`.
Naming follows the role's existing `system_baseline_<thing>` inputs (`system_baseline_essential_packages`, `system_baseline_remove_packages`). The base inputs keep their meaning (a flat input still replaces the profile list); the extras are added on top of whichever list results.
Mechanics, in `defaults/main.yml` next to the other resolved inputs, so consumers of the existing names see no change:
```yaml
system_baseline_extra_packages: []
system_baseline_extra_remove_packages: []
```
and `tasks/packages.yml` installs `system_baseline_essential_packages + system_baseline_extra_packages | unique` and loops over `system_baseline_remove_packages + system_baseline_extra_remove_packages | unique`. The two places that test list membership (`tmux` in `tasks/tmux.yml`, `unattended-upgrades` in `tasks/main.yml`) should test the combined list, so that an extra `tmux` behaves like a profile `tmux`.
Questions for the maintainer: (1) should a package named in both the extras install list and the remove list (base or extra) be refused in `tasks/validate.yml`? The proposal says yes, one `assert`. (2) Is a `type: list`/`elements: str` input with a `default: []` in `argument_specs.yml` and in `defaults/main.yml` the preferred shape (roles/AGENTS.md "argument_specs")?
## Acceptance criteria
- [ ] `system_baseline_extra_packages` and `system_baseline_extra_remove_packages` exist in `defaults/main.yml` (default `[]`) and in `meta/argument_specs.yml` with `type: list`, `elements: str`, a description and the same `default`. Check: `ansible-lint` (schema `role-arg-spec`) and `ansible-doc -t role mortis.kamino.system_baseline` show both.
- [ ] With both left at default, the packages installed and removed are identical to v3.0.0 for each of `ubuntu_vm`, `ubuntu_lxc` and `pve`. Check: the existing molecule `default` scenario still passes unchanged.
- [ ] With `system_baseline_extra_packages: [jq]` on `ubuntu_lxc`, `jq` is installed together with every package of the profile. Check: molecule verify asserts `jq` and `curl` (a profile package) are installed.
- [ ] With `system_baseline_extra_remove_packages: [<pkg>]`, that package is purged when installed, in addition to the profile's removals. Check: molecule verify asserts it is absent.
- [ ] A package named in both the install side and the remove side stops the run before any change, naming the input. Check: a molecule "refuse" scenario in the style of `refuse_reboot.yml`.
- [ ] An extra `tmux` or `unattended-upgrades` when a flat `system_baseline_essential_packages` override omitted it still enables the matching task. Check: molecule scenario asserts `/etc/profile.d/tmux-autostart.sh` exists.
- [ ] The README variables table and "Role interface" note list both inputs; a `minor_changes` fragment exists in `changelogs/fragments/`. Check: `pre-commit run --all-files` (antsibull-changelog-lint).
This is the contributor's own code and is offered under GPL-3.0-or-later, the Collection's licence.
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.
Problem
system_baselinepicks a package list per system type (system_baseline_profiles.<type>.essential_packagesand.remove_packages). A consumer who wants one more package than the profile (or one more removal) has no way to say only that:system_baseline_essential_packagesandsystem_baseline_remove_packagesare flat inputs that replace the whole resolved list. The consumer must copy the profile's full list into inventory and keep it in step with every release that changes the profile.system_baseline_profile_overridesmerges recursively into the profile, but the defaults file andargument_specs.ymlboth say lists inside it are replaced, not merged. Soprofile_overrides: {ubuntu_vm: {essential_packages: [jq]}}also drops every package the profile installs today.tmuxautostart is installed only whentmuxis in the resolved package list, and the unattended-upgrades task runs only whenunattended-upgradesis in it. A consumer who replaces the list and forgets either loses that behaviour without an error.Out of scope: package versions, per-package state other than present/absent, repositories, and changing the profiles' own lists.
Proposal
Two optional list inputs, empty by default, appended to the resolved lists:
system_baseline_extra_packages(list of str, default[]): installed in addition to the resolvedessential_packages.system_baseline_extra_remove_packages(list of str, default[]): removed in addition to the resolvedremove_packages.Naming follows the role's existing
system_baseline_<thing>inputs (system_baseline_essential_packages,system_baseline_remove_packages). The base inputs keep their meaning (a flat input still replaces the profile list); the extras are added on top of whichever list results.Mechanics, in
defaults/main.ymlnext to the other resolved inputs, so consumers of the existing names see no change:and
tasks/packages.ymlinstallssystem_baseline_essential_packages + system_baseline_extra_packages | uniqueand loops oversystem_baseline_remove_packages + system_baseline_extra_remove_packages | unique. The two places that test list membership (tmuxintasks/tmux.yml,unattended-upgradesintasks/main.yml) should test the combined list, so that an extratmuxbehaves like a profiletmux.Questions for the maintainer: (1) should a package named in both the extras install list and the remove list (base or extra) be refused in
tasks/validate.yml? The proposal says yes, oneassert. (2) Is atype: list/elements: strinput with adefault: []inargument_specs.ymland indefaults/main.ymlthe preferred shape (roles/AGENTS.md "argument_specs")?Acceptance criteria
system_baseline_extra_packagesandsystem_baseline_extra_remove_packagesexist indefaults/main.yml(default[]) and inmeta/argument_specs.ymlwithtype: list,elements: str, a description and the samedefault. Check:ansible-lint(schemarole-arg-spec) andansible-doc -t role mortis.kamino.system_baselineshow both.ubuntu_vm,ubuntu_lxcandpve. Check: the existing moleculedefaultscenario still passes unchanged.system_baseline_extra_packages: [jq]onubuntu_lxc,jqis installed together with every package of the profile. Check: molecule verify assertsjqandcurl(a profile package) are installed.system_baseline_extra_remove_packages: [<pkg>], that package is purged when installed, in addition to the profile's removals. Check: molecule verify asserts it is absent.refuse_reboot.yml.tmuxorunattended-upgradeswhen a flatsystem_baseline_essential_packagesoverride omitted it still enables the matching task. Check: molecule scenario asserts/etc/profile.d/tmux-autostart.shexists.minor_changesfragment exists inchangelogs/fragments/. Check:pre-commit run --all-files(antsibull-changelog-lint).This is the contributor's own code and is offered under GPL-3.0-or-later, the Collection's licence.
Assisted-by: Claude Code