An introduction to playbooks

Normally in IT, a playbook is a set of instructions run by someone when something happens; a little vague, I know, but stay with me. These range from everything to building and configuring new server instances, to how to deploy code updates and how to deal with problems when they occur.

In the traditional sense, a playbook is typically a collection of scripts or instructions for a user to follow and, while they are meant to introduce consistency and conformity across systems, even with the best intentions, this is almost never the case.

This is where Ansible comes in. Using an Ansible playbook, you are basically saying apply these changes and commands against these sets of hosts rather than someone having to log in and start working their way through the runbook manually.

Before we run a playbook, let's discuss how we provide Ansible with a list of hosts to target. To do this, we will be using the setup command. This simply connects to a host and then fetches as much information on the host as it can.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.223.123