Half of system administration is the same tasks on repeat: install updates, deploy configs, restart services, check disk space. Doing that by hand on three servers is a chore; on thirty it's a job you should automate before it eats your week.
Here are five tools that automate the repetitive parts of Linux admin work, from full configuration management down to five-line shell tricks.
1. Ansible — automation without agents
Ansible is the easiest starting point because it needs nothing on your servers except SSH and Python. You describe the desired state in YAML playbooks and run them from your laptop:
- hosts: all
become: true
tasks:
- name: Install security updates
apt:
upgrade: safe
update_cache: true
Run it against one server or a hundred — same command. Idempotent by design, so re-running changes nothing unless something drifted. Our Ansible setup guide takes you from install to first playbook in an evening.
2. Puppet — declarative management at scale
Puppet has managed server fleets for two decades. Instead of running playbooks on demand, a Puppet agent on each server periodically pulls its desired state from a central server and enforces it — so config drift gets corrected automatically, even if someone edits files by hand.
The model takes more setup than Ansible (server, agents, certificates), but for large estates that need continuous enforcement rather than occasional runs, it's still a solid choice.
3. Chef — infrastructure as Ruby code
Chef takes the "infrastructure as code" idea literally: you write recipes and cookbooks in Ruby, and an agent applies them. If your team thinks in code — tests, version control, CI pipelines — Chef fits naturally.
Fair warning: the learning curve is steeper than Ansible's YAML. It shines in teams that already have Ruby skills and want maximum programmability.
4. Cron — the original automation
Not everything needs a framework. Cron runs any command on a schedule, and it's already on every Linux box:
crontab -e
0 3 * * * /home/user/scripts/backup.sh
*/5 * * * * /home/user/scripts/check-disk.sh
Backups at 3am, disk checks every five minutes, log cleanup on Sundays — a dozen lines of crontab eliminates entire categories of chores. Our cron guide explains the syntax, and the cron parser tool translates expressions to plain English while you learn.
5. Shell scripts — glue for everything else
The humble bash script remains the fastest way to automate your specific workflow: the exact three commands you run after every deploy, the log rotation your app forgot to implement, the "restart if down" watchdog.
#!/usr/bin/env bash
set -euo pipefail
systemctl is-active --quiet myapp || systemctl restart myapp
df -h / | tail -1
Put it in cron and it's automation. Version it in git and it's documentation. Combined with SSH, a loop over servers gets you surprisingly far:
for host in web1 web2 web3; do
ssh "$host" 'sudo apt update && sudo apt upgrade -y'
done
How to choose
- Just starting, few servers → cron + shell scripts today, Ansible this week
- Large fleet, continuous enforcement → Puppet or Chef
- Team of Ruby developers → Chef feels like home
The tool matters less than the habit: if you did it twice by hand, automate it before the third time.
Top comments (0)