Replies: 3 comments
-
Since Ansible's inventory is inherently host-oriented, maybe it does make some sense that the inventory plugin is primarily indexed by Devices. Looking more into some possibilities, I might be able to work around this in a couple ways:
|
Beta Was this translation helpful? Give feedback.
-
You should use |
Beta Was this translation helpful? Give feedback.
-
Indeed, I think I will go forward using the For now, I'm able to cover my IP address enumeration (using tags for object filtration) need with a task like:
|
Beta Was this translation helpful? Give feedback.
-
I am using Netbox in a somewhat unusual setting for an Internet Exchange (IX), where we operate a shared Layer 2 Ethernet service, but have connections from devices that are outside of our administrative control.
We assign some IP addresses to IX participants which are tracked as IP Addresses in Netbox, with the participant-ownership tracked as a "Tenant" field on the IP address. However, these IP addresses are never assigned to device interfaces within our administrative control. But, we do wish to reference these Netbox objects inside of our Ansible when generating our DNS zone files and Route Server configurations.
Looking at the
netbox.netbox.nb_inventory
inventory plugin, it seems that it is only possible to query a list of Devices and objects that are associated with those Devices.This prompts a couple questions from me:
As much as possible, I would like to avoid creating a custom, one-off inventory plugin.
Beta Was this translation helpful? Give feedback.
All reactions