I would like an inventory type "directory" #1236
Replies: 3 comments 1 reply
-
If I may add to this discussion, I also think it would be useful to be able to create inventory based on resources such as IdM/FreeIPA and RH Satellite/Foreman. I believe both of these items would be categorized as dynamic inventory sources. This type of functionality exists in AWX/Ansible Automation Platform. |
Beta Was this translation helpful? Give feedback.
-
You can do this, it's just labeled "file" ... So for the Type field, you choose "File", and for the "Path to Inventory File" field, you just enter the path - like |
Beta Was this translation helpful? Give feedback.
-
As far as I know using dynamic inventories with Ansible, (I've only used the Azure Dynamic Inventory and Netbox), you always point the ansible-playbook to a YAML file which contains the configuration of the plugin. So as long as you have the needed collection in your collections/requirements.yml you can point the "File" inventory to the YAML file containing the plugin configuration. I have this currently setup for Netbox and it works a treat see #1336 |
Beta Was this translation helpful? Give feedback.
-
So that I may include whatever inventory file type or dynamic inventory (say vmware) in that directory. This is currently supported by ansible. Common example is to include several dynamic inventory sources into "one".
See: https://docs.ansible.com/ansible/latest/inventory_guide/intro_inventory.html#organizing-inventory-in-a-directory
Beta Was this translation helpful? Give feedback.
All reactions