Stage 4 · Provision
Ansible Automation
Configure whole fleets declaratively — from your first ad-hoc command to reusable roles, encrypted secrets, tested playbooks, and automation at data-center scale.
Prerequisite
Shell scripting + Linux.
What this course leaves you with
- Automate configuration across a fleet idempotently
- Write reusable roles and manage secrets safely
- Test playbooks at scale
Why this stage matters — Servers are automated — now codify the whole cloud.
Progress
0 of 42 lessons complete. Progress is stored locally in your browser so you can pick the path back up later.
course completion
Ansible Fundamentals
The mental model — agentless, idempotent, push-based configuration over SSH.
- 01Why AnsibleAgentless design, push vs pull, and where it fits next to Terraform.5 min
- 02Install & First InventoryControl node setup, INI vs YAML inventory, and connection basics.6 min
- 03Ad-Hoc CommandsRunning modules on the fly with ansible and the -m/-a flags.6 min
- 04Modules & IdempotencyWhy re-running is safe, changed vs ok, and check mode (--check).7 min
- 05SSH & Privilege EscalationKeys, become/sudo, connection plugins, and ansible.cfg essentials.6 min
- 06Gathering Factssetup module, custom facts, and conditional automation.6 min
Playbooks & Variables
Move from commands to declarative, version-controlled automation.
- 01Playbook StructurePlays, tasks, hosts, and the YAML you'll write daily.7 min
- 02Variables & Precedencegroup_vars, host_vars, extra-vars, and the 22-level precedence rules.8 min
- 03Handlers & NotifyRestarting services only when configuration changes.6 min
- 04Jinja2 TemplatesTemplating config files with filters, loops, and facts.7 min
- 05Loops & Conditionalsloop, when, block/rescue, and register for control flow.7 min
- 06Error Handling & Strategiesfailed_when, ignore_errors, serial rollouts, and free strategy.7 min
Roles & Collections
Package automation into reusable, shareable, testable units.
- 01Anatomy of a Roletasks, handlers, defaults, templates, and the directory layout.7 min
- 02Role Dependencies & Reusemeta/main.yml, include_role, and import_role patterns.6 min
- 03Ansible GalaxyInstalling, publishing, and requirements.yml pinning.6 min
- 04CollectionsFQCN, namespaces, and the modern content distribution model.7 min
- 05Designing Configurable RolesSensible defaults, documented variables, and interfaces.6 min
- 06Building an Internal LibraryCompany-wide roles, versioning, and a private Galaxy.6 min
Dynamic Inventory & Scale
Stop hand-maintaining host lists — let the cloud tell Ansible what exists.
- 01Dynamic InventoryInventory plugins for AWS, Azure, and GCP with auto-discovery.7 min
- 02Groups & Host PatternsGroup hierarchies, patterns, and limiting with --limit.6 min
- 03Constructed & Composite Inventorykeyed_groups, compose, and merging multiple sources.7 min
- 04Performance & Forksforks, pipelining, mitogen, and fact caching for large fleets.7 min
- 05Rolling & Canary Updatesserial, max_fail_percentage, and safe fleet rollouts.7 min
- 06Delegation & Local Actionsdelegate_to, run_once, and orchestrating across hosts.6 min
Secrets & Security
Keep credentials out of git and harden what Ansible touches.
- 01Ansible VaultEncrypting variables and files, vault IDs, and CI integration.7 min
- 02External Secret StoresHashiCorp Vault, cloud secret managers, and lookup plugins.7 min
- 03no_log & Safe OutputPreventing secret leakage into logs and diffs.5 min
- 04Hardening PlaybooksCIS benchmarks, SSH hardening, and compliance baselines.7 min
- 05Least-Privilege AutomationScoped become, restricted keys, and audit trails.6 min
- 06Supply-Chain SafetySigning content, pinning collections, and trusted sources.6 min
Testing, AWX & CI/CD
Treat automation like software — linted, tested, and delivered from a pipeline.
- 01ansible-lint & yamllintCatching anti-patterns and enforcing style in CI.6 min
- 02Testing Roles With MoleculeScenarios, Docker drivers, converge, and idempotence tests.8 min
- 03CI Pipelines for PlaybooksGitHub Actions/GitLab CI, dry-runs, and gated applies.7 min
- 04AWX / Automation PlatformJob templates, surveys, RBAC, schedules, and the web UI.8 min
- 05Workflow OrchestrationChaining jobs, approvals, and notifications in AWX.6 min
- 06Event-Driven AnsibleRulebooks reacting to alerts for self-healing automation.7 min
Observability-Driven Remediation
Connect Ansible automation to monitoring signals, approvals, and safe rollback workflows.
- 01Alert to PlaybookTrigger remediation from Prometheus Alertmanager, webhooks, and Event-Driven Ansible rulebooks.7 min
- 02Safe Remediation PatternsUse check mode, diff mode, serial batches, max_fail_percentage, and approval gates before changing hosts.8 min
- 03Rollback PlaybooksDesign reversible tasks with backups, handlers, versioned templates, and tested restore procedures.7 min
- 04Job Output ObservabilityExport AWX job events, callback plugins, structured logs, and metrics for automation runs.7 min
- 05ChatOps AutomationRun approved playbooks from Slack or Teams with AWX surveys, RBAC, and audit trails.6 min
- 06Post-Remediation ValidationVerify fixes with assert tasks, uri checks, service facts, Prometheus queries, and rollback triggers.7 min