Ansible: configure every server the same way, every time
This guide picks up where the Terraform guide left off. Your three VMs exist — now Ansible configures them consistently with hardened baselines, monitoring, and firewall rules. Every command runs from the ansible/ directory of your fork, and every "Expected" block below was captured from a real run against those VMs. Written by a sysadmin learning this in a homelab; not a production reference.
🎯
What you'll build
A reusable Ansible role that hardens SSH, installs packages, configures firewalls, sets up monitoring, and applies kernel hardening — idempotently.
📋
Prerequisites
The Linux control node from the Terraform guide and the three VMs it built, reachable over SSH with the lab key. Any other Linux server works the same way once it is in the inventory.
☑️
How it works
Same as the TF guide: expand steps, read the explanation, check them off. Progress saves in your browser. Platform-colored steps are optional.
🔗
Related pages
TF = Terraform guide Ref = quick reference cheat sheet Builder = generates role YAML Scripts = all code files to copy
Platform colors:
Ubuntu
RHEL/Rocky
— colored steps are optional, skip what doesn't apply
Sync Progress
Copy this URL and open it in another browser to restore your progress.