Ansible playbooks are written in the YAML data serialization format.If you don't know what a data serialization format is, think of it as a way to translate a programmatic data structure (lists, arrays, dictionaries, etc) into a format that can be easily stored to disk.
Each playbook contains one or more plays, which map hosts to a certain function.
Ansible does this through something called tasks, which are basically module calls.
, but Ansible only wants one per file, so this should only be present at the top of the file.
Ansible is an easy configuration management system that can be used to automate and organize your system configuration tasks for a large network of computers.
While some other configuration management systems require many different packages to be installed on the server and client systems, with Ansible, you only need to install a server component and have SSH access to the client machines.
In a previous guide, we discussed how to install the Ansible software and learn basic commands.
In this guide, we will discuss Ansible playbooks, which are Ansible's way of creating automated scripts to configure client computers.
We will assume that you have a configured Ansible server and a few clients, just as we left off in the last tutorial.
In our guide, the server is a Ubuntu 12.04 machine, and the clients that we are going to be configuring are also Ubuntu 12.04 machines, for ease of explanation.
Ansible playbooks are a way to send commands to remote computers in a scripted way.
Instead of using Ansible commands individually to remotely configure computers from the command line, you can configure entire complex environments by passing a script to one or more systems.