Is it possible to pull in data from Netbox Plugins via the netbox_inventory module? #1483
-
|
Hi All, As per the title, just wondering if it's possible to pull in data from netbox plugins using the netbox ansible inventory module? Use case: I've written a plug in that tracks certificates against devices / vms (which certs are installed on what devices). I'd like to be able to use ansible to run a playbook against the devices to check if they're the installed / the latest version. If it is possible, if anyone has an example from a playbook, or could point me to one that would be amazing! Apologies if this question has been asked before, I did check the history, but I couldn't see anything. Thanks in advance for any help. Thanks, NS |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
You should create a custom If you are trying to get it to be integrated into the NetBox inventroy plugin, where it pulls that data and adds it to the host vars similar to |
Beta Was this translation helpful? Give feedback.
You should create a custom
lookupplugin that takes a device FQDN and then calls your custom NetBox plugin on the NetBox server, and just use the NetBox inventory to retrieve the hosts.If you are trying to get it to be integrated into the NetBox inventroy plugin, where it pulls that data and adds it to the host vars similar to
fetch_allor the various options (interfaces, services, etc) you would have to fork and extend the inventory plugin to accomplish that. I don't recommend that.