Skip to content

Ansible for Mere Mortals

Ansible is a tool for making many computers match a description you wrote down. Instead of SSH-ing into each machine and typing the same commands, you describe the end state — this package installed, that config file with these contents, this service running — and Ansible makes it so, on ten machines as easily as one. It needs nothing installed on the target machines except SSH and Python, and it changes nothing when everything already matches.

This guide assumes you can use a terminal and have SSH-ed into a machine before. Everything Ansible-specific — inventories, playbooks, modules, idempotency — is explained from zero.

What this guide covers

What it doesn't cover

Ansible's commercial side (AWX/Tower automation controller), writing your own modules and plugins, Windows targets in depth, and using Ansible as a network-switch configuration tool. This guide is the Linux-server core that everything else builds on.

How to use this guide

Every command and playbook was run for real with ansible-core 2.21.5 — including the shipped files in examples/, which run unchanged. The lab uses two pretend servers reached over a local connection so it works on one machine; against real servers the same playbooks travel over SSH, and SSH-specific operational details that weren't run here are marked (documented).


Part of the series

This guide is one of the For Mere Mortals guides: plain-language guides to the tools programmers and makers use.

Related guides:

License

The writing in this guide is licensed under CC BY 4.0. Code examples and lab scripts are licensed under the MIT License.