© Michael Heap 2016

Michael Heap, Ansible, 10.1007/978-1-4842-1659-0_2

2. The Inventory File

Michael Heap

(1)Reading, Berkshire, UK

In Chapter 1, you put together a simple playbook and ran it against your Vagrant machine using the vagrant provision command. You can run that same playbook against any machine that also has a running SSH server by using the ansible-playbook command. First, however, you need an inventory file .

In this chapter, we’ll take a look at what an inventory file is, how to run ansible-playbook without Vagrant, and how to leverage the inventory file when you have a complex inventory of machines with which you need to interact.

What’s an Inventory?

In configuration management, the tool that you’re using needs to know which machines ...

Get Ansible: From Beginner to Pro now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.