Writing your own inventory plugin
While the inventory plugins that have been covered so far cover the most popular services, it is impossible for them to cover every possibility. A good example of this is a SOT that has been custom-built for a team or company. The easiest way to access something like this is through an API. However, it does not have to use an API and can instead make use of Python to access data to build an inventory.
Ansible configuration changes
As discussed, when using collection plugins, a project should have a certain structure to it. In addition, there are advantages to testing to structure it in a particular order. The recommended structure to use is that of the inventory_plugin_creation
folder in this chapter’s repository files, as illustrated here:
├── ansible.cfg
├── inventories
│ └── plugin.yml
├── inventory_plugins
│ ...