--- # General defaults for all system types # timedatectl reports the canonical name; "UTC" would show as changed on every run. system_baseline_timezone: "Etc/UTC" system_baseline_locale: "en_US.UTF-8" system_baseline_reboot_if_required: true # Run the package update (tasks/update.yml) in the main flow. false skips it, for hosts that are patched by a separate, # operator-run flow; the tasks_from: update entry point does not read it. system_baseline_update: 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. # # How to override: # - A flat input (for example system_baseline_essential_packages) replaces that value # entirely. Lists and dicts are replaced, not merged. # - system_baseline_profile_overrides merges recursively into the active profile, keyed by # system_type, so one key of a dict can change without repeating the rest: # system_baseline_profile_overrides: # ubuntu_vm: # unattended_upgrade_settings: # "Unattended-Upgrade::Automatic-Reboot": true # (the ubuntu_vm profile does not reboot on its own; a host opts in this way) # Lists inside it are still replaced. # Never reference a flat input inside the profiles: the chain is one-way # (profiles -> profile -> flat inputs). system_baseline_profiles: pve: essential_packages: - vim - htop - curl - wget # - ufw - fail2ban - smartmontools - etckeeper - lvm2 - jq - python3-pip - apt-transport-https - ca-certificates - gnupg - unattended-upgrades remove_packages: - telnet - ftp - xinetd - samba - whoopsie - modemmanager - snapd apt_periodic_settings: "APT::Periodic::Update-Package-Lists": true "APT::Periodic::Download-Upgradeable-Packages": true "APT::Periodic::AutocleanInterval": 7 "APT::Periodic::Unattended-Upgrade": true # How the main flow upgrades packages: dist runs apt-get dist-upgrade, which can also remove packages that a Proxmox VE update replaces; # a safe upgrade holds those back. A Proxmox host is updated with full-upgrade, the same as dist-upgrade (Proxmox's documented way); # the Ubuntu profiles keep safe. apt_upgrade: dist unattended_upgrade_settings: "Unattended-Upgrade::Automatic-Reboot": false "Unattended-Upgrade::Automatic-Reboot-Time": "03:00" "Unattended-Upgrade::Remove-Unused-Dependencies": true "Unattended-Upgrade::MinimalSteps": true # The only origins unattended-upgrades may install from: Debian's point releases and Debian-Security, never the # Proxmox repository. This is Debian 13's own default set, pinned so that a future default cannot widen it. # ${distro_codename} is expanded by unattended-upgrades, not by Ansible. [] leaves the distribution default alone. unattended_upgrade_origins: - "origin=Debian,codename=${distro_codename},label=Debian" - "origin=Debian,codename=${distro_codename},label=Debian-Security" - "origin=Debian,codename=${distro_codename}-security,label=Debian-Security" sysctl_hardening: - { name: "net.ipv4.tcp_syncookies", value: 1 } - { name: "kernel.randomize_va_space", value: 2 } - { name: "net.ipv4.conf.all.accept_source_route", value: 0 } - { name: "net.ipv4.conf.all.accept_redirects", value: 0 } - { name: "net.ipv4.conf.all.secure_redirects", value: 0 } - { name: "net.ipv4.icmp_echo_ignore_broadcasts", value: 1 } - { name: "net.ipv4.icmp_ignore_bogus_error_responses", value: 1 } - { name: "net.ipv4.conf.all.log_martians", value: 1 } - { name: "vm.swappiness", value: 10 } secure_tmp_mounts: - /dev/shm - /tmp - /var/tmp ubuntu_lxc: essential_packages: - logrotate - vim - tmux - curl - wget - git - htop - ufw - fail2ban - unattended-upgrades - net-tools - iproute2 - cron - apt-transport-https - ca-certificates - gnupg remove_packages: - snapd - cloud-init - whoopsie - modemmanager - popularity-contest - telnet - ftp - xinetd - samba - avahi-daemon apt_periodic_settings: "APT::Periodic::Update-Package-Lists": true "APT::Periodic::Download-Upgradeable-Packages": true "APT::Periodic::AutocleanInterval": 7 "APT::Periodic::Unattended-Upgrade": true apt_upgrade: safe unattended_upgrade_settings: "Unattended-Upgrade::Automatic-Reboot": false "Unattended-Upgrade::Automatic-Reboot-Time": "05:00" "Unattended-Upgrade::Remove-Unused-Dependencies": true "Unattended-Upgrade::MinimalSteps": true # Not pinned: the distribution default origins apply. unattended_upgrade_origins: [] sysctl_hardening: - { name: "net.ipv4.tcp_syncookies", value: 1 } - { name: "net.ipv4.conf.all.accept_source_route", value: 0 } - { name: "net.ipv4.conf.all.accept_redirects", value: 0 } - { name: "net.ipv4.conf.all.secure_redirects", value: 0 } - { name: "net.ipv4.icmp_echo_ignore_broadcasts", value: 1 } - { name: "net.ipv4.icmp_ignore_bogus_error_responses", value: 1 } secure_tmp_mounts: - /dev/shm ubuntu_vm: essential_packages: - qemu-guest-agent - logrotate - vim - tmux - curl - wget - git - htop - ufw - fail2ban - unattended-upgrades - etckeeper - ncdu - software-properties-common - net-tools - python3-pip - lsof - apt-transport-https - ca-certificates - gnupg remove_packages: - telnet - ftp - xinetd - snapd - modemmanager - whoopsie - popularity-contest apt_periodic_settings: "APT::Periodic::Update-Package-Lists": true "APT::Periodic::Download-Upgradeable-Packages": true "APT::Periodic::AutocleanInterval": 7 "APT::Periodic::Unattended-Upgrade": true apt_upgrade: safe unattended_upgrade_settings: "Unattended-Upgrade::Automatic-Reboot": false "Unattended-Upgrade::Automatic-Reboot-Time": "04:00" "Unattended-Upgrade::Remove-Unused-Dependencies": true "Unattended-Upgrade::MinimalSteps": true # Not pinned: the distribution default origins apply. unattended_upgrade_origins: [] sysctl_hardening: - { name: "net.ipv4.tcp_syncookies", value: 1 } - { name: "kernel.randomize_va_space", value: 2 } - { name: "net.ipv4.conf.all.accept_source_route", value: 0 } - { name: "net.ipv4.conf.all.accept_redirects", value: 0 } - { name: "net.ipv4.conf.all.secure_redirects", value: 0 } - { name: "net.ipv4.icmp_echo_ignore_broadcasts", value: 1 } - { name: "net.ipv4.icmp_ignore_bogus_error_responses", value: 1 } - { name: "net.ipv4.conf.all.log_martians", value: 1 } secure_tmp_mounts: - /dev/shm # Sparse per-system_type overrides, merged recursively into the active profile. system_baseline_profile_overrides: {} # Selects the profile. system_baseline_system_type is a required input with no default, # validated by tasks/validate.yml (map the inventory's system type onto it). system_baseline_profile: >- {{ system_baseline_profiles[system_baseline_system_type] | combine(system_baseline_profile_overrides[system_baseline_system_type] | default({}), recursive=True) }} # Inputs the tasks read system_baseline_essential_packages: "{{ system_baseline_profile.essential_packages }}" system_baseline_remove_packages: "{{ system_baseline_profile.remove_packages }}" system_baseline_apt_periodic_settings: "{{ system_baseline_profile.apt_periodic_settings }}" # safe or dist (see the profiles). Guarded: the tasks_from: update entry point needs no system_baseline_system_type, and without one it # stays on a safe upgrade instead of failing on the profile lookup. default('safe'): a system_baseline_profiles written before this key # existed keeps the plain upgrade. system_baseline_apt_upgrade: "{{ (system_baseline_profile.apt_upgrade | default('safe')) if system_baseline_system_type is defined else 'safe' }}" system_baseline_unattended_upgrade_settings: "{{ system_baseline_profile.unattended_upgrade_settings }}" # default([]): a system_baseline_profiles written before this key existed keeps the distribution default. system_baseline_unattended_upgrade_origins: "{{ system_baseline_profile.unattended_upgrade_origins | default([]) }}" # Packages unattended-upgrades must not touch, on top of the profile: a per-host list, empty by default (see README, "Unattended-upgrades # package blacklist"). Entries are regular expressions matched against the package name. system_baseline_unattended_upgrade_package_blacklist: [] system_baseline_sysctl_hardening: "{{ system_baseline_profile.sysctl_hardening }}" system_baseline_secure_tmp_mounts: "{{ system_baseline_profile.secure_tmp_mounts }}"