inventory.ip_version (or NETBOX_INVENTORY_IP_VERSION): both (default),
v4 or v6; the ip-addresses source filters by family server-side, the
virtual-machines source picks primary_ip4/primary_ip6 for ansible_host.
one filter option plus its value, set in config or via
NETBOX_INVENTORY_FILTER / NETBOX_INVENTORY_FILTER_VALUE:
- tenant (both sources), resolved by name server-side
- named (ip-addresses), only addresses with a DNS name, deduplicated
- vrf (ip-addresses), resolved by name server-side
- domain (both sources), hostname ends with the domain
- cluster, site (virtual-machines), resolved by name server-side
hosts land in a single "netbox" group with hostvars under _meta; IP
addresses use the DNS name as inventory hostname when set, virtual
machines expose their primary IP as ansible_host when they have one.
config.yaml next to the script (or $NETBOX_INVENTORY_CONFIG) with environment
variable overrides, requests session with token auth, paginated list fetching
and readable error reporting.