1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix: Duplicate vmid in proxmox_disk module #5492 (#5493)

https://github.com/ansible-collections/community.general/issues/5492
This commit is contained in:
Doc_Tiebeau 2022-11-13 21:03:30 +01:00 committed by GitHub
parent bc0f99386b
commit 27a4ffc293
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -725,7 +725,7 @@ def main():
actual_size = disk_config['size'] actual_size = disk_config['size']
if size == actual_size: if size == actual_size:
module.exit_json(changed=False, vmid=vmid, msg="Disk %s is already %s size" % (disk, 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)) module.exit_json(changed=True, vmid=vmid, msg="Disk %s resized in VM %s" % (disk, vmid))
except Exception as e: except Exception as e:
module.fail_json(msg="Failed to resize disk %s in VM %s with exception: %s" % (disk, vmid, str(e))) module.fail_json(msg="Failed to resize disk %s in VM %s with exception: %s" % (disk, vmid, str(e)))