diff --git a/netbox_inventory.yml b/netbox_inventory.yml new file mode 100644 index 0000000..ecb9015 --- /dev/null +++ b/netbox_inventory.yml @@ -0,0 +1,24 @@ +# netbox_inventory.yml +plugin: netbox.netbox.nb_inventory + +api_endpoint: https://your-netbox-url +token: your_netbox_api_token + +# Disable physical devices entirely +fetch_all: false +device_query_filters: + - status: "__SKIP__" # trick to return nothing for devices + +# Only pull VMs +virtual_machines_filters: + - status: active + - cluster_id: 1 # optional: filter to a specific cluster ID + +group_by: + - cluster + - cluster_type + - site + - platform + +compose: + ansible_host: "primary_ip4.address | ansible.utils.ipaddr('address')" \ No newline at end of file