* Fix error when checking if VM exists.
* Add changelog entry.
* Reword changelog entry.
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 36ddb9b8e5
)
Co-authored-by: Markus Reiter <me@reitermark.us>
pull/4317/head
parent
d7b31655c4
commit
a56879c1b0
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- proxmox_kvm - fix error when checking whether Proxmox VM exists (https://github.com/ansible-collections/community.general/pull/4287).
|
|
@ -1205,7 +1205,7 @@ def main():
|
|||
proxmox.get_vm(vmid)
|
||||
|
||||
# Ensure the choosen VM name doesn't already exist when cloning
|
||||
existing_vmid = proxmox.get_vmid(name, choose_first_if_multiple=True)
|
||||
existing_vmid = proxmox.get_vmid(name, ignore_missing=True, choose_first_if_multiple=True)
|
||||
if existing_vmid:
|
||||
module.exit_json(changed=False, vmid=existing_vmid, msg="VM with name <%s> already exists" % name)
|
||||
|
||||
|
|
Loading…
Reference in New Issue