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

[PR #6770/70e2048d backport][stable-7] proxmox_disk: fix failure to create cdrom (#6796)

proxmox_disk: fix failure to create cdrom (#6770)

* proxmox_disk: fix failure to create cdrom

* Add changelog fragment 6770

* Update changelogs/fragments/6770-proxmox_disk_create_cdrom.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 70e2048d8c)

Co-authored-by: exodious <10215736+exodious@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2023-06-27 07:07:39 +02:00 committed by GitHub
parent 28c7a62989
commit dc898dfdf8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- proxmox_disk - fix unable to create ``cdrom`` media due to ``size`` always being appended (https://github.com/ansible-collections/community.general/pull/6770).

View file

@ -505,7 +505,9 @@ class ProxmoxDiskAnsible(ProxmoxAnsible):
timeout_str = "Reached timeout while importing VM disk. Last line in task before timeout: %s"
ok_str = "Disk %s imported into VM %s"
else:
config_str = "%s:%s" % (self.module.params["storage"], self.module.params["size"])
config_str = self.module.params["storage"]
if self.module.params.get("media") != "cdrom":
config_str += ":%s" % (self.module.params["size"])
ok_str = "Disk %s created in VM %s"
timeout_str = "Reached timeout while creating VM disk. Last line in task before timeout: %s"