mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Set task status correctly for vmware_guest shutdown and reboot. (#26515)
This commit is contained in:
parent
443b25d72a
commit
9190598096
1 changed files with 3 additions and 0 deletions
|
@ -572,6 +572,9 @@ class PyVmomiHelper(object):
|
|||
task = vm.ShutdownGuest()
|
||||
else:
|
||||
task = vm.RebootGuest()
|
||||
# Set result['changed'] immediately because
|
||||
# shutdown and reboot return None.
|
||||
result['changed'] = True
|
||||
else:
|
||||
result['failed'] = True
|
||||
result['msg'] = "VM %s must be in poweredon state & tools should be installed for guest shutdown/reboot" % vm.name
|
||||
|
|
Loading…
Reference in a new issue