facts: only look up prefixes and VLANs once

Not once per host.
This commit is contained in:
Timotej Lazar 2025-04-10 22:21:44 +02:00
parent d2b9b05406
commit a1c7be8184

View file

@ -3,6 +3,7 @@
delegate_to: localhost
block:
- name: Lookup networks and prefixes
run_once: true
set_fact:
vlans: '{{ query("netbox.netbox.nb_lookup", "vlans", api_filter="group=new-net", raw_data=true)
| sort(attribute="vid") }}'