netbox-community / ansible_modules

NetBox modules for Ansible using Ansible Collections
GNU General Public License v3.0
305 stars 198 forks source link

[Feature]: Use last_updated field when using cache #1278

Open mulmat opened 6 days ago

mulmat commented 6 days ago

NetBox version

v4.0.6

Feature type

Change to existing Module

Proposed functionality

Make caching smarter by using the last_updated field. E.g. just fetch objects that have been added/updated since last run (+ also handle when objects have been deleted).

Use case

We have a lot of IP addresses and fetching them takes quite some time. Using cache resolves this issue but introduces an issue with stale data. I'm happy to submit a PR for this.

External dependencies

-