From cc5a1022113bf2ed9ca0977868778ba10ac3fbdf Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 26 Mar 2024 13:11:35 +0100 Subject: [PATCH] fix: use get to access network key --- plugins/inventory/proxmox.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/inventory/proxmox.py b/plugins/inventory/proxmox.py index 548389a..b4ccc4a 100644 --- a/plugins/inventory/proxmox.py +++ b/plugins/inventory/proxmox.py @@ -200,7 +200,7 @@ class InventoryModule(BaseInventoryPlugin): if networks and isinstance(networks, list): for network in networks: - for ip_address in network["ip-addresses"]: + for ip_address in network.get("ip-addresses", []): address = validate(ip_address["ip-address"]) else: try: