Introducing Ansible (slide deck)
The deck from the free software day, rebuilt as one scrolling page so it needs no keyboard or projector. The written version lives with the talk itself.
1. Hello
A systems and network engineer, mostly Unix, with a taste for small boards, Perl and the odd bit of soldering. The tools on the laptop are NetBSD, Debian, Xen and a terminal.
2. Configuration management, in one breath
Describe the state a machine should be in, apply that description, and keep a record of every change. That is the whole idea. Everything else is machinery.
3. Nothing here is new
Older tools have done this for years, each with its own strengths. Newer does not automatically mean better; it means a different set of trade offs.
4. The small newcomer
- Access over SSH, so no agent is installed on the managed machines.
- Descriptions in YAML, which reads and diffs like plain notes.
- A push model, so a run reports its result immediately.
5. The inventory
A file lists hosts and groups, with variables attached to either. A grouped inventory keeps related machines together and lets a role apply to the whole group at once.
6. Ad hoc commands
One module applied to a group answers a question quickly: is this package present, is this service up, is this file the same everywhere.
7. Modules
Each module does one small job: install a package, manage a line in a file, copy a template. Small modules compose into larger jobs.
8. Playbooks
An ordered list of tasks, with handlers that fire only when something actually changes. A play names the hosts, the user to connect as, and the tasks to run.
9. A worked example
A baseline role installs a common set of packages, deploys authorised keys and configures a monitoring agent. Reused across groups, one edit updates every machine that includes it.
10. What to do next
Point it at one spare machine and write a playbook that installs a package. The idea makes sense after about ten minutes of doing.
Read the talk write up, or the official documentation.