Ansible
Configuration management tool for automating provisioning and maintaining desired state across multiple hosts from a single control node.
A reference section
These pages are a learning reference for Ansible; host names and IPs are examples. For the GitOps approach to deploying stacks, see GitOps.
Start with the Complete Tutorial for the concepts and an end-to-end walkthrough, or Base Configuration for the complete worked example.
-
Installing Ansible, initial SSH key setup, and the project structure.
-
Installing Ansible on the control node.
-
How tasks work — modules, loops, conditionals, register, handlers, and blocks.
-
The toolbox — apt, copy, template, file, service, and the rest, with examples.
-
Writing
.j2files — Jinja2 variables, filters, loops, and conditionals. -
System facts, magic variables, and which value wins when names collide.
-
Where modules come from, FQCNs, and installing collections.
-
Ad-hoc commands & running playbooks
One-off commands, running playbooks, check mode,
--diff, tags, and limiting scope. -
Defining managed hosts and running ad hoc commands.
-
Variables let you define values once and reuse them.
-
Encrypting secrets and sensitive variables in playbooks and inventory.
-
Structuring playbooks into reusable, portable units.
-
Repeatable, ordered task definitions for configuring hosts.
-
Templates for running Docker containers with Ansible.