From f9761d0b1e94d59a2ba54a0750f65df32d5b2d1b Mon Sep 17 00:00:00 2001 From: kris Date: Thu, 28 May 2026 14:58:09 +0100 Subject: [PATCH] Add netbox_inventory.yml --- netbox_inventory.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 netbox_inventory.yml 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