diff --git a/changelogs/fragments/3034-promox-kvm-return-new-id.yaml b/changelogs/fragments/3034-promox-kvm-return-new-id.yaml new file mode 100644 index 0000000000..8cbd769a04 --- /dev/null +++ b/changelogs/fragments/3034-promox-kvm-return-new-id.yaml @@ -0,0 +1,3 @@ +--- +bugfixes: + - proxmox_kvm - fix result of clone, now returns ``newid`` instead of ``vmid`` (https://github.com/ansible-collections/community.general/pull/3034). diff --git a/plugins/modules/cloud/misc/proxmox_kvm.py b/plugins/modules/cloud/misc/proxmox_kvm.py index 939c72a126..159968ce6e 100644 --- a/plugins/modules/cloud/misc/proxmox_kvm.py +++ b/plugins/modules/cloud/misc/proxmox_kvm.py @@ -1303,7 +1303,7 @@ def main(): if update: module.exit_json(changed=True, vmid=vmid, msg="VM %s with vmid %s updated" % (name, vmid)) elif clone is not None: - module.exit_json(changed=True, vmid=vmid, msg="VM %s with newid %s cloned from vm with vmid %s" % (name, newid, vmid)) + module.exit_json(changed=True, vmid=newid, msg="VM %s with newid %s cloned from vm with vmid %s" % (name, newid, vmid)) else: module.exit_json(changed=True, msg="VM %s with vmid %s deployed" % (name, vmid), **results) except Exception as e: