The Ansible playbook is at the heart of the Ansible Configuration Management and Automation System. Each playbook is made up of one or more plays. The concept of a playbook was derived from sporting references, where a coach would create a set of plays off the field and execute them during a game. The creators of Ansible leveraged this idea to create and successfully deliver an easy-to-use automation and Configuration Management solution. Playbook's are developed using YAML (more about this in the next section), and optionally Jinja2 for more comprehensive automation implementations.
Ansible playbook comprise a few specific structural and formatting elements, namely the following:
- YAML syntax (the language Ansible leverages for automation)
- Jinja2 (optional)
- The hosts section (which defines the host groups to target during execution)
- One or many...