From 54746161f2e0f8ea1f9a340ff8731cbf48c708ac Mon Sep 17 00:00:00 2001 From: Kenneth Joss Date: Fri, 19 Apr 2024 14:57:00 +0200 Subject: [PATCH] Add cluster host to the plugins response --- plugins/inventory/nb_inventory.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/inventory/nb_inventory.py b/plugins/inventory/nb_inventory.py index 8f3136536..50fad1eca 100644 --- a/plugins/inventory/nb_inventory.py +++ b/plugins/inventory/nb_inventory.py @@ -538,6 +538,7 @@ def group_extractors(self): "cluster": self.extract_cluster, "cluster_group": self.extract_cluster_group, "cluster_type": self.extract_cluster_type, + "cluster_device": self.extract_cluster_device, "is_virtual": self.extract_is_virtual, "serial": self.extract_serial, "asset_tag": self.extract_asset_tag, @@ -947,6 +948,9 @@ def extract_cluster_type(self, host): except Exception: return + def extract_cluster_device(self, host): + return host.get("device") + def extract_is_virtual(self, host): return host.get("is_virtual")