Lion Cipher Lab
Automate machine configuration with Ansible (basics)
- Cyber / Security Engineer
- Intermediate
- ~45 min
- Free · no account required
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
- Ansible basics
- agentless configuration management
- writing an inventory
- ad-hoc commands
- writing an idempotent playbook
- installing packages and managing services declaratively
- templating config files with correct permissions
- understanding idempotency
- protecting secrets with ansible-vault
- least-privilege SSH for automation
Steps in this lab
- What Ansible is: push config over SSH, no agent
- Install Ansible on your control machine
- Write an inventory of your own hosts
- Run an ad-hoc command: the ping module
- Write a small idempotent playbook
- Understand idempotency: run it twice
- Secrets, least privilege, and reviewing before you run
- Reality: automation multiplies mistakes too