Inventory parsing and data sources
In Ansible, nothing happens without an inventory. Even ad hoc actions performed on localhost require an inventory, even if that inventory consists just of the localhost. The inventory is the most basic building block of Ansible architecture. When executing ansible
or ansible-playbook
, an inventory must be referenced. Inventories are either files or directories that exist on the same system that runs ansible
or ansible-playbook
. The location of the inventory can be referenced at runtime with the –inventory-file
(-i
) argument, or by defining the path in an Ansible config file.
Inventories can be static or dynamic, or even a combination of both, and Ansible is not limited to a single inventory. The standard practice ...
Get Mastering Ansible 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.