mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-04 15:29:10 -07:00
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit bf94f08bc4
)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
6058a5e5b1
commit
2245742255
40 changed files with 55 additions and 55 deletions
|
@ -1204,12 +1204,12 @@ def main():
|
|||
# Ensure source VM id exists when cloning
|
||||
proxmox.get_vm(vmid)
|
||||
|
||||
# Ensure the choosen VM name doesn't already exist when cloning
|
||||
# Ensure the chosen VM name doesn't already exist when cloning
|
||||
existing_vmid = proxmox.get_vmid(name, ignore_missing=True)
|
||||
if existing_vmid:
|
||||
module.exit_json(changed=False, vmid=existing_vmid, msg="VM with name <%s> already exists" % name)
|
||||
|
||||
# Ensure the choosen VM id doesn't already exist when cloning
|
||||
# Ensure the chosen VM id doesn't already exist when cloning
|
||||
if proxmox.get_vm(newid, ignore_missing=True):
|
||||
module.exit_json(changed=False, vmid=vmid, msg="vmid %s with VM name %s already exists" % (newid, name))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue