feat(system_baseline): add inputs that append packages to the profile's lists
system_baseline_essential_packages and system_baseline_remove_packages replace the whole list, and so does a list inside system_baseline_profile_overrides, so adding one package meant repeating the profile's list and keeping it in step with every release. system_baseline_extra_packages and system_baseline_extra_remove_packages (lists, default empty) append to the resolved lists. The tmux and unattended-upgrades checks read the combined list, so an extra tmux or unattended-upgrades enables the matching task like a profile package. Items must be Debian package names: a null item would have become the package "None", and apt reads a trailing minus (jq-) as a removal. A package that one input installs and another purges stops the run before any change; only overlaps that involve an extra are checked, so a consumer's own overlap between the resolved lists behaves as before. A flat input that is a plain string still counts as a one-item list. With both inputs left at their default the role behaves as before. Closes #399 Assisted-by: Claude Code:claude-sonnet-5-5
This commit is contained in:
1 parent
aa4e8c68a7
commit
d5a91520df
12 files changed
+269
-14
No files matched your search
@@ -63,7 +63,8 @@ argument_specs:
|
||||
Attach an interactive SSH login to a tmux session, creating it when it does not exist. Installs C(/etc/profile.d/tmux-autostart.sh),
|
||||
which acts only for an interactive login shell with a terminal, so scp, sftp, C(ssh host command) and automation are unaffected.
|
||||
Shells that do not read C(/etc/profile.d) (zsh, fish) are unaffected too. A user opts out with C(~/.no-tmux). Installed only when
|
||||
C(tmux) is in the resolved package list (the C(ubuntu_lxc) and C(ubuntu_vm) profiles); with false, or without tmux, the file is
|
||||
C(tmux) is among the packages to install (the C(ubuntu_lxc) and C(ubuntu_vm) profiles have it, and C(system_baseline_extra_packages)
|
||||
can add it to any profile, C(pve) included); with false, or without tmux, the file is
|
||||
removed. A failed attach leaves a plain shell; detaching ends the SSH connection.
|
||||
system_baseline_tmux_session:
|
||||
type: str
|
||||
@@ -152,6 +153,27 @@ argument_specs:
|
||||
A non-empty list is written to C(/etc/apt/apt.conf.d/90unattended-upgrades-blacklist) as C(Unattended-Upgrade::Package-Blacklist).
|
||||
apt appends list entries across files, so these are added to those of C(50unattended-upgrades). An empty list removes the file.
|
||||
An entry may not hold a double quote, a backslash or a line break.
|
||||
system_baseline_extra_packages:
|
||||
type: list
|
||||
elements: str
|
||||
default: []
|
||||
description:
|
||||
- >-
|
||||
Packages installed in addition to the resolved C(system_baseline_essential_packages). The list appends: setting
|
||||
C(system_baseline_essential_packages) itself replaces the profile's list. A package named here also counts for the checks that read
|
||||
the package list (C(tmux) for the tmux snippet, C(unattended-upgrades) for the unattended-upgrades tasks). Each item is a Debian
|
||||
package name: lower-case letters, digits, C(+), C(-) and C(.), two or more characters, starting with a letter or digit and not
|
||||
ending in C(-) (apt reads a trailing minus as a removal). A package that is also in C(system_baseline_remove_packages) or
|
||||
C(system_baseline_extra_remove_packages) stops the run before any change.
|
||||
system_baseline_extra_remove_packages:
|
||||
type: list
|
||||
elements: str
|
||||
default: []
|
||||
description:
|
||||
- >-
|
||||
Packages purged, when installed, in addition to the resolved C(system_baseline_remove_packages). The list appends. Each item is a
|
||||
Debian package name, as for C(system_baseline_extra_packages). A package that is also in C(system_baseline_essential_packages)
|
||||
stops the run before any change.
|
||||
system_baseline_update:
|
||||
type: bool
|
||||
default: true
|
||||
|
||||
Reference in new issue
Block a user