This commit is contained in:
Abdul Anshad A 2017-06-28 21:17:53 +05:30 committed by James Cammarata
parent 36975c50ef
commit 61b18cc355

View file

@ -1893,6 +1893,12 @@ def main():
elif state == 'absent':
module.exit_json(changed=False, msg="vm %s not present" % guest)
# check if user is trying to perform state operation on a vm which doesn't exists
elif state in ['present', 'powered_off', 'powered_on'] and not all((vm_extra_config,
vm_hardware, vm_disk, vm_nic, esxi)):
module.exit_json(changed=False, msg="vm %s not present" % guest)
# Create the VM
elif state in ['present', 'powered_off', 'powered_on']: