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 (cherry picked from commit27a4ffc293
) * Add changelog fragment. (cherry picked from commit672385309c
) Co-authored-by: Doc_Tiebeau <elie.saintfelix@gmail.com> Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
fef6abc8c8
commit
09ea441316
2 changed files with 3 additions and 1 deletions
2
changelogs/fragments/5493-proxmox.yml
Normal file
2
changelogs/fragments/5493-proxmox.yml
Normal file
|
@ -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)."
|
|
@ -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)))
|
||||
|
|
Loading…
Reference in a new issue