diff --git a/changelogs/fragments/47722-vmware_guest_powerstate-restore_timeout.yaml b/changelogs/fragments/47722-vmware_guest_powerstate-restore_timeout.yaml new file mode 100644 index 0000000000..217fbc94a4 --- /dev/null +++ b/changelogs/fragments/47722-vmware_guest_powerstate-restore_timeout.yaml @@ -0,0 +1,2 @@ +bugfixes: +- Restore timeout in set_vm_power_state operation in vmware_guest_powerstate module. diff --git a/lib/ansible/modules/cloud/vmware/vmware_guest_powerstate.py b/lib/ansible/modules/cloud/vmware/vmware_guest_powerstate.py index 3d927978a1..522931657d 100644 --- a/lib/ansible/modules/cloud/vmware/vmware_guest_powerstate.py +++ b/lib/ansible/modules/cloud/vmware/vmware_guest_powerstate.py @@ -207,7 +207,7 @@ def main(): "given are invalid: %s" % (module.params.get('state'), to_native(e.msg))) else: - result = set_vm_power_state(pyv.content, vm, module.params['state'], module.params['force']) + result = set_vm_power_state(pyv.content, vm, module.params['state'], module.params['force'], module.params['state_change_timeout']) else: module.fail_json(msg="Unable to set power state for non-existing virtual machine : '%s'" % (module.params.get('uuid') or module.params.get('name')))