0Pricing
Ansible Academy · Lesson

Multiple Plays in One Playbook

Target web then db in a single file.

More Than One Play

A playbook is a YAML list, so it can hold multiple plays. Each play targets its own host group. 🎭

Why Split Into Plays

Different tiers need different work. One play sets up web servers, another configures the database hosts.

All lessons in this course

  1. A Play = Hosts + Tasks
  2. Naming Tasks for Readable Output
  3. Multiple Plays in One Playbook
  4. Task Order & Top-Down Execution
← Back to Ansible Academy