mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
parent
36975c50ef
commit
61b18cc355
1 changed files with 6 additions and 0 deletions
|
@ -1893,6 +1893,12 @@ def main():
|
||||||
elif state == 'absent':
|
elif state == 'absent':
|
||||||
module.exit_json(changed=False, msg="vm %s not present" % guest)
|
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
|
# Create the VM
|
||||||
elif state in ['present', 'powered_off', 'powered_on']:
|
elif state in ['present', 'powered_off', 'powered_on']:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue