diff --git a/plugins/inventory/ntnx_prism_vm_inventory.py b/plugins/inventory/ntnx_prism_vm_inventory.py index 4a085861..9b079e6f 100644 --- a/plugins/inventory/ntnx_prism_vm_inventory.py +++ b/plugins/inventory/ntnx_prism_vm_inventory.py @@ -184,6 +184,11 @@ def parse(self, inventory, loader, path, cache=True): self.inventory.set_variable( vm_name, "ntnx_categories", entity["metadata"]["categories"] ) + self.inventory.set_variable( + vm_name, + "project_reference", + entity.get("metadata", {}).get("project_reference", {}), + ) # Add variables created by the user's Jinja2 expressions to the host self._set_composite_vars(