Lion Cipher Lab

Automate machine configuration with Ansible (basics)

Why it matters

The moment you look after more than one machine, doing things by hand stops scaling and starts drifting: you install a package on one box and forget it on another, you edit a config file slightly differently each time, and six months later no two hosts are quite the same. Configuration management fixes that by letting you *declare* the state you want — this package present, this service running, this config file with these exact permissions — and letting a tool make every host match, the same way, every time. Ansible is the most approachable way in: it is free, open source, and agentless, so…

What you'll learn

Steps in this lab

  1. What Ansible is: push config over SSH, no agent
  2. Install Ansible on your control machine
  3. Write an inventory of your own hosts
  4. Run an ad-hoc command: the ping module
  5. Write a small idempotent playbook
  6. Understand idempotency: run it twice
  7. Secrets, least privilege, and reviewing before you run
  8. Reality: automation multiplies mistakes too

Open the full interactive lab →