Ansible Configuration Management at Scale
Idempotent Playbooks, Roles, Inventory & Ansible Vault
6 modules, 28 lessons: Introduction And Setup; Inventory And Targets; Playbooks, Plays And Tasks; Variables, Facts And Logic; Roles And Collections; Security And Practices.
Intermediate · 1 hour · 28 lessons · 63 labs
Who it is for
Intermediate level.
For Linux administrators and operations engineers who look after more than a handful of servers and want every one set up the same way, every time.
What you don't need yet:
- No servers of your own: labs run your playbooks in the browser
- You don't need to write Python, though Ansible runs on it
- No previous Ansible or configuration management experience
What helps:
- Linux administration basics: users, packages and services
- Logging in to a server with SSH keys
Before you start:
- SSH keys and Linux administration basics
Take first:
- Linux Fundamentals & Systems Administration — Beginner
- Bash Scripting & Command Line Automation — Beginner
- Advanced Git Internals & Distributed Workflows — Beginner
Take next:
- RHCE in Ansible (EX294): Automate Red Hat Systems — Advanced
- Infrastructure as Code with Terraform — Intermediate
Learning paths:
Nobody needs to know everything before they start. Each course builds on the one before, so a learning path takes you there step by step.
Labs
63 labs, 22 of them graded: you write the code, it runs, and graded labs check the result. The outline lists each lesson's labs.
What is free
Start free: First 3 lessons free with an account. Pro: Every course, lab, handbook, practice exam and certificate.
- Pro monthly — $29 a month. Every course, lab, handbook, practice exam and certificate
- Pro yearly — $249 a year. Every course, lab, handbook, practice exam and certificate
Course outline
Introduction And Setup
- What Configuration Management Is (5 labs): You can say what configuration management is, why it comes after provisioning rather than instead of it, and demonstrate the difference between a script that repeats its work and a playbook that does not.
- Ansible Architecture And The Control Node (5 labs): You can name the two roles in an Ansible setup, explain what agentless means in terms of what actually happens on a managed node during a task, and point at the two files on the control node that decide who is managed and how.
- Installing Ansible (4 labs): You can install Ansible into an isolated Python environment, say what the core engine gives you and what the community package adds on top, pin the version for a team, and prove the control node works with a playbook rather than a version string.
- Your First Ad Hoc Command (3 labs): You can run a module against a host pattern from the command line, read the result block it returns, tell changed from unchanged in that block, and decide when an ad hoc command is the right tool and when it is a playbook in disguise.
Inventory And Targets
- The Static Inventory File (5 labs): You can write a static inventory in either the ini or the YAML form, declare groups and groups of groups, expand a host range, and select any subset of hosts with a pattern before running anything against them.
- Host Groups And Host Variables (5 labs): You can attach variables to a group or to a single host using the group vars and host vars directories, predict which value wins when several apply, and read the resolved set of variables for any host without running a play.
- Dynamic Inventory (6 labs): You can explain why a written host list fails in an elastic environment, read and run an inventory script, prefer an inventory plugin to a script, and build groups automatically from host attributes with keyed groups.
- Connections And Privilege Escalation (4 labs): You can set the connection variables that decide how Ansible reaches a host, choose the right connection plugin, and escalate privilege correctly with become at the play or task level rather than logging in as root.
Playbooks, Plays And Tasks
- Playbook Syntax And YAML (2 labs): You can read a playbook as YAML and explain how plays and tasks fit together.
- Writing Your First Playbook (2 labs): You can write a local playbook that creates a directory and a file in its workspace.
- Modules And Idempotency (2 labs): You can choose a module for a state change and explain why repeating an idempotent task is safe.
- Check Mode And Diff (2 labs): You can preview a playbook with check mode and inspect proposed file changes with diff output.
- Handlers And Notify (2 labs): You can trigger a handler only when a task changes and explain when handlers run.
Variables, Facts And Logic
- Variables And Precedence (1 lab): You can define variables at useful scopes and explain which value wins when scopes overlap.
- Gathering Facts (1 lab): You can inspect gathered facts and use a fact safely in a task.
- Conditionals (1 lab): You can guard tasks with a when condition based on variables or facts.
- Loops (1 lab): You can repeat one task over a list and read the loop item in its output.
- Templates With Jinja (2 labs): You can render a Jinja template from variables and keep the template readable.
- Error Handling With Block, Rescue And Always (1 lab): You can group risky tasks and provide rescue and always actions for predictable recovery.
Roles And Collections
- The Standard Directory Layout And Roles (1 lab): You can recognize a role layout and explain how it packages reusable automation.
- Writing A Role (1 lab): You can write a small role and include it from a playbook.
- Using Collections (1 lab): You can explain how collections namespace modules and other Ansible content.
- Ansible Galaxy (1 lab): You can use Galaxy concepts to find, install, and review reusable Ansible content.
- Testing With Molecule (1 lab): You can describe Molecule's role in testing automation and its limits on a single build machine.
Security And Practices
- Securing Data With Ansible Vault (1 lab): You can explain what Vault encrypts and keep secret values out of ordinary playbook text.
- Vault IDs And Multiple Passwords (1 lab): You can explain Vault IDs and choose separate credentials for different encrypted data sets.
- Environment Specific Configuration (1 lab): You can organize defaults and environment overrides without duplicating the playbook logic.
- Performance, Forks And Best Practices (1 lab): You can choose practical Ansible defaults for speed, clarity, and safe repeatable runs.