feat(system_baseline): optional tmux session on SSH login
Build / build (pull_request) Successful in 12s
Lint / lint (pull_request) Successful in 20s
Molecule / molecule (pull_request) Successful in 1m40s

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
This commit is contained in:
DragonishandClaude Sonnet 5.5 committed 2026-11-14 14:26:19 +00:00
1 parent e4c9be903d
commit dcdc9133f6
9 files changed
+161 -3

No files matched your search

+9
View File
@@ -6,6 +6,13 @@ system_baseline_locale: "en_US.UTF-8"
system_baseline_reboot_if_required: true
# Upper bound of the persistent journal (journald SystemMaxUse); older archived files are removed above it.
system_baseline_journal_max_use: 200M
# Attach an interactive SSH login to a tmux session (see tasks/tmux.yml). Off by default: it changes what every login does.
# Only the ubuntu_lxc and ubuntu_vm profiles honour it; pve never installs the snippet.
system_baseline_tmux_autostart: false
# Name of the session an SSH login attaches to.
system_baseline_tmux_session: main
# Windows created, as extra entries next to a plain shell, when the session is created: a list of {name, command}.
system_baseline_tmux_windows: []
# Per-system_type policy. Everything below is a role default, so group_vars and host_vars
# override it with normal Ansible precedence.
@@ -83,6 +90,7 @@ system_baseline_profiles:
essential_packages:
- logrotate
- vim
- tmux
- curl
- wget
- git
@@ -137,6 +145,7 @@ system_baseline_profiles:
- qemu-guest-agent
- logrotate
- vim
- tmux
- curl
- wget
- git