Koskamo

Playbooks: plays, tasks, and idempotency

Document v1 · published by Koskamo editorial · updated 2026-10-04

Original source

Ansible playbooks provide a repeatable, reusable configuration management and multimachine deployment system, expressed in YAML with a minimum of syntax. A playbook is an ordered list of plays, and each play runs one or more tasks that call Ansible modules; both plays and tasks execute from top to bottom. At a minimum, each play defines the managed nodes to target, using a pattern, and at least one task to execute. For Ansible 2.10 and later, use the fully-qualified collection name (FQCN) so the correct module is selected when multiple collections ship modules with the same name. Most modules check whether the desired final state has already been achieved and exit without performing any actions if it has — modules that behave this way are idempotent, so running a playbook once or multiple times should produce the same outcome. Not all modules behave this way, so test playbooks in a sandbox environment before repeating them in production. Pass -C or --check to ansible-playbook for check mode, which reports the changes it would have made without altering systems. Scope: Ansible. Reviewed October 4, 2026.

Source and provenance

Original source
docs.ansible.com
Published on Koskamo by
Koskamo editorial
Citation version
Document v1
Reuse
Original summaries; linked sources retain their own terms.

The original source supplies the underlying information. Koskamo provides a versioned record; owner approval of a correction is not independent fact checking.