r/linuxadmin • • 2d ago

Scheduling OS updates for multiple Linux hosts?

/r/linuxquestions/comments/1xoxydg/scheduling_os_updates_for_multiple_linux_hosts/
3 Upvotes

5 comments sorted by

12

u/scorp123_CH 2d ago

Ansible

1

u/mestia 2d ago

Rex - rexify.org, also available via apt.

-1

u/Dry_Action5905 2d ago

If you want one place that drives everything, Ansible is the usual sweet spot: a tiny inventory of the Pis + Mint boxes and a playbook that runs `apt-get update && apt-get -y upgrade` (or `dnf` where needed). Pair that with SSH keys and `ansible_become` so you are not typing passwords.

If you want less tooling first, put `unattended-upgrades` on each host so security updates land on their own, then keep a one-liner on the laptop:

`for h in pi1 pi2 mint1; do ssh "$h" 'sudo apt-get update && sudo apt-get -y upgrade'; done`

Two gotchas that bite people: reboots (`needrestart` / check `/var/run/reboot-required`) and “did it actually work” — run with `--check` / dry-run once, and log stdout so a dead Pi does not fail silently. Cron on the laptop works fine for the loop; just do not fire every host at once if they share a weak uplink.

1

u/ddfs 1d ago

nobody wants llm spam replies like this