From 9fa8b09cb0d416b61b495ee5ae6a2045294bf0d0 Mon Sep 17 00:00:00 2001 From: Mike Morency Date: Tue, 16 Jul 2024 09:18:32 -0400 Subject: [PATCH] bug --- plugins/modules/folder_template_from_vm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/folder_template_from_vm.py b/plugins/modules/folder_template_from_vm.py index 5db7277b..8ff3b94f 100644 --- a/plugins/modules/folder_template_from_vm.py +++ b/plugins/modules/folder_template_from_vm.py @@ -205,7 +205,7 @@ def __get_source_vm(self): if len(vms) != 1: self.module.fail_json("Multiple VMs found during search. Try using the vm_name_match or vm_uuid/vm_moid attributes.") - vm = vm[0] + vm = vms[0] if vm.runtime.powerState != 'poweredOff': self.module.fail_json(msg="VM must be in powered off state before creating a template from it.")