From 324a44eb182ed6a83bc75f8d78eb6ef4598c600a Mon Sep 17 00:00:00 2001 From: Yannik Sembritzki Date: Fri, 15 Nov 2024 13:38:11 +0100 Subject: [PATCH] Fix errors occuring during hardware version upgrade not being reported (fixes #2001) (#2010) SUMMARY This fixes #2001. ISSUE TYPE Bugfix Pull Request COMPONENT NAME vmware_guest Reviewed-by: Mario Lenz --- ...x-vm-hardware-version-upgrade-error-not-being-reported.yml | 3 +++ plugins/modules/vmware_guest.py | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/2010-fix-vm-hardware-version-upgrade-error-not-being-reported.yml diff --git a/changelogs/fragments/2010-fix-vm-hardware-version-upgrade-error-not-being-reported.yml b/changelogs/fragments/2010-fix-vm-hardware-version-upgrade-error-not-being-reported.yml new file mode 100644 index 0000000000..44e8c38d14 --- /dev/null +++ b/changelogs/fragments/2010-fix-vm-hardware-version-upgrade-error-not-being-reported.yml @@ -0,0 +1,3 @@ +bugfixes: + - vmware_guest - Fix errors occuring during hardware version upgrade not being reported. + (https://github.com/ansible-collections/community.vmware/pull/2010). diff --git a/plugins/modules/vmware_guest.py b/plugins/modules/vmware_guest.py index 90328450c3..f6f3395137 100644 --- a/plugins/modules/vmware_guest.py +++ b/plugins/modules/vmware_guest.py @@ -3185,7 +3185,9 @@ def reconfigure_vm(self): self.relospec.deviceChange = [] self.configure_guestid(vm_obj=self.current_vm_obj) self.configure_cpu_and_memory(vm_obj=self.current_vm_obj) - self.configure_hardware_params(vm_obj=self.current_vm_obj) + err = self.configure_hardware_params(vm_obj=self.current_vm_obj) + if err is not None: + return err self.configure_encryption_params(vm_obj=self.current_vm_obj) self.configure_disks(vm_obj=self.current_vm_obj) self.configure_network(vm_obj=self.current_vm_obj)