Creating custom dynamic inventories for Ansible | Jeff Geerling
www.jeffgeerling.com › blog › creating-customJun 11, 2015 · Let's start working our own custom dynamic inventory script by outlining the basic JSON format Ansible expects: Ansible expects a dictionary of groups (each group having a list of hosts, and group variables in the group's vars dictionary), and a _meta dictionary that stores host variables for all hosts individually (inside a hostvars dictionary). When you return a _meta dictionary in your inventory script, Ansible stores that data in its cache and doesn't call your inventory script N times ...