June 2020
Intermediate to advanced
410 pages
9h 52m
English
So far in this book, we have been specifying our inventory file (either static or dynamic) using the -i switch in our Ansible commands. What might not be apparent is that you can specify the -i switch more than once and so use multiple inventories at the same time. This enables you to perform tasks such as running a playbook (or ad hoc command) across hosts from both static and dynamic inventories at the same time. Ansible will work out what needs to be done—static inventories should not be marked as executable and so will not be processed as such, whereas dynamic inventories will be. This small but clever trick enables you to combine multiple inventory sources with ease. Let's ...