1
0
Fork 0
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:
Andrew Makousky 2017-08-25 09:21:02 -05:00 committed by ansibot
parent 443b25d72a
commit 9190598096

View file

@ -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