Skip to content

Swagger OpenAPI json endpoint caching for Ansible dynamic Inventory? (api/docs/?format=openapi) #5903

Answered by ryanmerolle
schmitmd asked this question in Q&A
Discussion options

You must be logged in to vote

Asible netbox inventory queries a bunch of api endpoints by default. To speed that up, you can try to trim that out.

For example: if you only want to query physical devices, don't use query_filters (since it also queries virtual devices) but use device_query_filters

You could also set fetch_all to false and do the same for services .

I suggest you read the various arguments on https://docs.ansible.com/ansible/latest/collections/netbox/netbox/nb_inventory_inventory.html#ansible-collections-netbox-netbox-nb-inventory-inventory.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by ryanmerolle
Comment options

You must be logged in to vote
2 replies
@candlerb
Comment options

@schmitmd
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants