Skip to content

Course

Ansible: Automation Without Agents

Inventories, playbooks, roles, idempotency, vault, rolling deploys, and the conventions that keep a 200-playbook codebase — and its supply chain — honest.

13 lessons

Course Q&A

Keep reading

Related articles from the SudoSecurity blog.

Reviews

Enrolled members can rate this course.

No reviews yet.

Core Mechanics

The agentless model, inventories, and the idempotency contract — what Ansible is actually doing when you press enter.

  1. 01The Agentless Model: SSH, Python, and No DaemonsWhat the control node actually ships over SSH, what agentless costs in concurrency and attack surface, and where Python and privilege still hide.22mOpen
  2. 02Inventories: Groups, Variables, and Dynamic SourcesStatic and dynamic inventories, group_vars/host_vars layering, and the limit patterns that turn all-of-prod into one canary.22mOpen
  3. 03ansible-core, Collections, and Execution EnvironmentsWhy the 2.10 packaging split moved your modules into collections, which Python floors changed in 2.17, and how pins and EE images make a run reproducible.20mOpen
  4. 04Playbooks and the Idempotency ContractPlays, tasks, and the changed/ok/failed contract — why modules beat shell, and how check+diff makes a run reviewable.24mOpen

Playbooks in Anger

Variables, facts, loops, handlers, templates, and secrets — the machinery inside real playbooks.

  1. 01Variables, Facts, and the 22-Level Precedence MazeWhere variables live, which precedence rungs actually bite, and why ansible_facts['x'] is the spelling that survives 2.24.24mOpen
  2. 02Loops, Handlers, and Conditionals Without the Trapsloop, until/retries, Jinja-truthy when clauses, and the handler lifecycle that decides whether your reload ever fires.22mOpen
  3. 03Jinja2 Templates and Vault Secretstemplate/copy/lineinfile by ownership, validate: so a bad config never lands, and the vars.yml+vault.yml layout that keeps secrets greppable but encrypted.24mOpen
  4. 04Delegation, run_once, and the Rolling Updateserial batches, delegate_to for LB drains, run_once per slice, and async — the choreography that turns a playbook into a deploy.25mOpen

Keeping It Maintainable

Roles, collections, failure handling, speed, and the project conventions that scale past a hundred playbooks.

  1. 01Roles and Collections: The Units of ReuseThe role directory contract, defaults vs vars, dependency semantics, and when a role earns its own repo.22mOpen
  2. 02Failure Handling, Execution Strategies, and Speedblock/rescue/always, failed_when honesty, and the forks/pipelining/fact-cache knobs that turn a 45-minute run into a 6-minute one.25mOpen
  3. 03Debugging When Ansible Tells You Nothingmodule_stderr, -vvv, the on-failed debugger, ansible-console, and --start-at-task — the five tools that answer where the run actually died.20mOpen
  4. 04Running Ansible Without Handing It the KeysWhy delegate_to and lookup('pipe') execute on your control node, ansible.cfg auto-loading, no_log, fact caches, and pinning the Galaxy supply chain.22mOpen
  5. 05The 200-Playbook Codebase: Layout, Testing, and ConventionsThe layout, tagging vocabulary, Molecule and lint in CI, and the conventions that keep a shared Ansible repo navigable.24mOpen