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
Review of #122.
- A failed attach no longer closes the connection: the snippet does not exec tmux, it
prints a line and leaves the plain shell (a client TERM without terminfo made every
login fail). A clean detach still ends the connection.
- The snippet acts only for an interactive shell (case $-): a login shell that is not
interactive, such as `ssh -t host 'bash -lc cmd'`, is left alone. Docs corrected.
- Validation anchors with \Z, so a trailing newline from a YAML block scalar is refused.
It moves to validate.yml (tag always); argument_specs already covers types.
- Install keys on tmux being in the resolved package list, not a second profile list.
- verify.yml: the snippet does nothing without a terminal, the trailing-newline refusals,
and the removal path. The vacuous pve assert is gone.
- README and argument_specs: window commands start with a minimal environment (use absolute
paths), zsh and fish do not read /etc/profile.d, detach ends the connection.
Adds tmux to the ubuntu_lxc and ubuntu_vm profiles and an opt-in
/etc/profile.d snippet that attaches an interactive SSH login to a tmux
session, created with configurable windows when it does not exist.
- system_baseline_tmux_autostart (default false), _session (default main)
and _windows ([{name, command}]); only ubuntu_lxc and ubuntu_vm install
the snippet, pve never does, and false removes it.
- profile.d is read only by an interactive login shell, so scp, sftp,
ssh host command and automation are unaffected. ~/.no-tmux opts a user
out. ForceCommand is not used: it would affect every session type.
- Names and commands are validated and shell-quoted; the script is
root-owned. Commands run as the logging-in user and are world-readable,
so they must hold no secret.
- Molecule converge enables it, verify checks ownership, mode, the attach
line, the quoting and sh -n.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Q72rsMEKREGMfB9DH3T9mR