Automation that's idempotent
Ansible is automation built on SSH. It connects to managed hosts via SSH and runs commands directly — no agent software needed on the targets. You write playbooks (YAML files describing desired state), and Ansible converges machines toward that state. Run a playbook twice and the second run does nothing if everything's already correct — that's idempotence, the property that makes Ansible safe to re-run.
The mental model
- Inventory — your list of hosts (you have one already at
~/.fleet/all.txt). - Modules — building blocks:
ping,command,copy,file,apt,brew,service,git, etc. Each one is idempotent. - Playbook — YAML describing a multi-step task ("install these packages, copy these files, restart this service").
Why Ansible over shell scripts
A shell script tells the machine what to do. A playbook describes what state to be in. The first runs commands; the second checks state and acts only if needed. Re-running an idempotent playbook is safe; re-running a script that creates files might make duplicates, restart services unnecessarily, or fail on the second pass.