pez-infra/ansible/services/samba/config/london-b.conf
Rasmus "Pez" Wejlgaard 07d59579d3
Some checks are pending
Deploy (on merge + daily) / Discover hosts (push) Waiting to run
Deploy (on merge + daily) / deploy (push) Blocked by required conditions
Back up the Proxmox VMs to london-b (#151)
Neither Proxmox host had a single backup job, so the game servers, the
k3s control planes and the workspace VMs had no backups at all.

copenhagen-a has nowhere local to keep them (`local` is the root LV and
already 82% full), so both hosts now back up to a new pve-backups Samba
share on london-b, each into its own directory. VMIDs overlap between
the two hosts, and retention prunes by VMID, so they can't share one.

- media_stack creates a Samba-only pvebackup user on london-b, the share
  and the per-host directories. The password comes from SOPS and gets
  re-set if the login stops working. smb.conf is now checked with
  testparm before it's deployed.
- proxmox_ve adds a backup-only london-b-backups CIFS storage, pushes the
  credentials again if the storage goes inactive, and fails the deploy
  if it still can't reach london-b.
- Jobs are defined in host_vars. Each job keeps a hash of its settings
  in its comment, so the role only touches jobs that changed and removes
  ones I delete from host_vars. Jobs made by hand are left alone.

london-a backs up the control plane every night. copenhagen-a backs up
the control plane and game servers every night and the workspace VMs
weekly, since every run is a full archive going over the WAN.
2026-09-17 17:12:16 +01:00

66 lines
1.6 KiB
Text

[global]
workgroup = WORKGROUP
server string = %h server (Samba, Ubuntu)
log file = /var/log/samba/log.%m
max log size = 1000
logging = file
panic action = /usr/share/samba/panic-action %d
server role = standalone server
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
map to guest = bad user
# COCKPIT ZFS MANAGER
# WARNING: DO NOT EDIT, AUTO-GENERATED CONFIGURATION
include = /etc/cockpit/zfs/shares.conf
[HDD]
comment = HDD
path = /hdd
valid users = pez root
public = no
writable = yes
# vzdump target for the Proxmox hosts. One subdirectory per host, because
# VMIDs overlap between london-a and copenhagen-a and retention prunes by VMID.
# The user is created by the media_stack role; its name must match
# proxmox_ve_backup_smb_user in group_vars/all/secrets.enc.yaml.
[pve-backups]
comment = Proxmox VE backups
path = /hdd/pve/backups
valid users = pvebackup
browseable = no
writable = yes
create mask = 0640
directory mask = 0750
[Movies]
comment = Movies
path = /hdd/movies
public = yes
writable = no
[TV Shows]
comment = TV Shows
path = /hdd/tv
public = yes
writable = no
[printers]
comment = All Printers
browseable = no
path = /var/tmp
printable = yes
guest ok = no
read only = yes
create mask = 0700
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = no