mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
* proxmox: Fix error on VM clone (#4278)
Incorrect parameters for `get_vmid()` and `get_vm()` caused failures when
cloning VMs.
Fixes #4278
* Update changelogs/fragments/4306-proxmox-fix-error-on-vm-clone.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Davíð Steinn Geirsson <david@isnic.is>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit c0f53d60c4
)
Co-authored-by: Davíð Steinn Geirsson <david@dsg.is>
This commit is contained in:
parent
7f4cd86fe5
commit
77b7a65002
2 changed files with 3 additions and 1 deletions
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- "proxmox_kvm - fix error in check when creating or cloning (https://github.com/ansible-collections/community.general/pull/4306)."
|
|
@ -1210,7 +1210,7 @@ def main():
|
|||
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
|
||||
if proxmox.get_vm(newid, ignore_errors=True):
|
||||
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))
|
||||
|
||||
if delete is not None:
|
||||
|
|
Loading…
Reference in a new issue