diff --git a/changelogs/fragments/5493-proxmox.yml b/changelogs/fragments/5493-proxmox.yml new file mode 100644 index 0000000000..a14b7767e6 --- /dev/null +++ b/changelogs/fragments/5493-proxmox.yml @@ -0,0 +1,2 @@ +bugfixes: + - "proxmox_disk - avoid duplicate ``vmid`` reference (https://github.com/ansible-collections/community.general/issues/5492, https://github.com/ansible-collections/community.general/pull/5493)." diff --git a/plugins/modules/proxmox_disk.py b/plugins/modules/proxmox_disk.py index 7a39d38d05..8f55e2d130 100644 --- a/plugins/modules/proxmox_disk.py +++ b/plugins/modules/proxmox_disk.py @@ -725,7 +725,7 @@ def main(): actual_size = disk_config['size'] if size == actual_size: module.exit_json(changed=False, vmid=vmid, msg="Disk %s is already %s size" % (disk, size)) - proxmox.proxmox_api.nodes(vm['node']).qemu(vmid).resize.set(vmid=vmid, disk=disk, size=size) + proxmox.proxmox_api.nodes(vm['node']).qemu(vmid).resize.set(disk=disk, size=size) module.exit_json(changed=True, vmid=vmid, msg="Disk %s resized in VM %s" % (disk, vmid)) except Exception as e: module.fail_json(msg="Failed to resize disk %s in VM %s with exception: %s" % (disk, vmid, str(e)))