Building Ansible inventories
Note
Making Open Source More Inclusive
Red Hat is committed to replacing problematic language in our code, documentation, and web properties. We are beginning with these four terms: master, slave, blacklist, and whitelist. We ask that you open an issue or pull request if you come upon a term that we have missed. For more details, see our CTO Chris Wright’s message.
Welcome to the guide to building Ansible inventories. An inventory is a list of managed nodes, or hosts, that Ansible deploys and configures. This guide introduces you to inventories and covers the following topics:
Creating inventories to track list of servers and devices that you want to automate.
Using dynamic inventories to track cloud services with servers and devices that are constantly starting and stopping.
Using patterns to automate specific sub-sets of an inventory.
Expanding and refining the connection methods Ansible uses for your inventory.
- How to build your inventory
- Inventory basics: formats, hosts, and groups
- Passing multiple inventory sources
- Organizing inventory in a directory
- Adding variables to inventory
- Assigning a variable to one machine: host variables
- Defining variables in INI format
- Assigning a variable to many machines: group variables
- Organizing host and group variables
- How variables are merged
- Connecting to hosts: behavioral inventory parameters
- Inventory setup examples
- Working with dynamic inventory
- Patterns: targeting hosts and groups
- Connection methods and details