From ad-hoc to repeatable
Ad-hoc ansible all -a 'cmd' is the parallel-ssh use case. Playbooks are where Ansible earns its keep — multi-step workflows that converge machines toward a desired state, idempotently.
Anatomy of a playbook
YAML file with: a play (target hosts + tasks), tasks (each one calls a module), optionally registered output (register:) you can branch on with when:. Modules are the building blocks; orchestration is your composition.