Skip to content

Commit

Permalink
fixes issue ansible#5633 (ansible#19716)
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdul-Anshad-A authored and jimi-c committed Jun 28, 2017
1 parent 36975c5 commit 61b18cc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/ansible/modules/cloud/vmware/vsphere_guest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']:

Expand Down

0 comments on commit 61b18cc

Please sign in to comment.