Add netbox_inventory.yml
This commit is contained in:
@@ -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')"
|
||||
Reference in New Issue
Block a user