O'Reilly logo

Ansible Configuration Management - Second Edition by Daniel Hall

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. Simple Playbooks

Ansible can be used as a command-line tool for making small changes. However, its real power lies in its scripting abilities. While setting up machines, we almost always need to do more than one thing at a time. Ansible uses a concept named playbook to do this. Using playbooks, we can perform many actions at once, and across multiple systems. They provide a way to orchestrate deployments, ensure a consistent configuration, or simply perform a common task.

Playbooks are expressed in YAML, and for the most part, Ansible uses a standard YAML parser. This means that we have all the features of YAML available to us as we write them. For example, we can use the same commenting system in playbook as we would in YAML. Many lines ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required