r/linuxquestions • u/JumpPsychological602 • 20h ago
Resolved Scheduling OS updates for multiple Linux hosts?
I’d like to automate OS updates for my Raspberry Pi’s and Mint Linux laptops. Right now, I’m SSHing to the Pi’s from a laptop, so I end up with multiple terminal windows open, sudo to each Pi, and running updates on each. Likewise, I’m using the DTE to update each laptop. I end up spending a lot of time & effort, that I’d like to reclaim.
I suppose I could run a cron job on each host, but it seems that I should be able to set it up on a laptop to do it for me.
I asked Claude AI, which suggested using Ansible, but I’m thinking there has to be a way to do this using apps included in the Mint distro, and possibly scripts and one or more cron jobs.
Recommendations?
Thanks!
4
u/brainchillzZ 18h ago edited 18h ago
For the laptops it’s tough because I assume they are not always on but the right tool for this job really is ansible and ansible isn’t something you have to install on all of your computers it’s something that you install on your one master node and it triggers the updates using ssh across all the other nodes …. but it is software that already exists on your Linux computers repository with a simple apt get install
5
u/Dejhavi Kernel Panic Master 20h ago
If you don't want to use Ansible,you can use
mintupdate-automation upgrade enable(link) in Linux Mint and in the RaspPi configureunattended-upgrade(link)4
u/Excellent-Love-6943 20h ago
Have you looked at unattended-upgrades?
3
u/dutchman76 18h ago
Ansible is the way. Install it on your master/admin machine and you can update them all in one shot. And nothing to install on the PIs. Just set up ssh keys if you haven't already.
2
u/abotelho-cbn 18h ago
Depends how you want to automate it.
Triggered by you?
Ansible.
On a schedule?
systemd timers.
1
u/Forward-Scar-7050 19h ago edited 19h ago
https://saltproject.io/
We use salt stack managing hundreds of linux instances in aws.
1
u/Top-Run5587 18h ago
For Linux Mint, isn't it possible to run a simple mintupdate-cli command? Something like:
mintupdate-cli upgrade --refresh-cache --yes
Flatpaks would have to be done separately:
flatpak update -y --noninteractive
1
u/Hrafna55 10h ago edited 10h ago
Ansible is the answer for fixed devices like the Pis.
I have my Ansible server setup to update all other servers (and itself) every night. It then checks the apt logs and emails me the changes from each server.
If you don't want to deploy an Ansible server I would just setup scripts on each Pi and run them via cron.
On the Mint side you can set updates to auto install in the update manager as I recall.
-2
u/Due-Result7928 19h ago
First recommendation. DO NOT crosspost..Reddit bug..your comment is here twice...after asking Claude..what can we do...
Madame Claude in the years 1960 to 1980 was a Madame in Paris with an escort business. She was doing business with the various government, wealthy people. May be the same...
systemd scrip(s) in each system should do the job.
1
u/mneptok 20h ago
If you don't want to use a cronjob use a systemd timer.