From a1c7be81845fe5883426054fe74618271070a599 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Thu, 10 Apr 2025 22:21:44 +0200 Subject: [PATCH] facts: only look up prefixes and VLANs once Not once per host. --- roles/facts/tasks/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/facts/tasks/main.yml b/roles/facts/tasks/main.yml index 536242a..60b5529 100644 --- a/roles/facts/tasks/main.yml +++ b/roles/facts/tasks/main.yml @@ -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") }}'