mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
[PR #6770/70e2048d backport][stable-6] proxmox_disk: fix failure to create cdrom (#6795)
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:
parent
3d87fbf6f9
commit
a9a9e723e5
2 changed files with 5 additions and 1 deletions
2
changelogs/fragments/6770-proxmox_disk_create_cdrom.yml
Normal file
2
changelogs/fragments/6770-proxmox_disk_create_cdrom.yml
Normal 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).
|
|
@ -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"
|
||||
|
||||
|
|
Loading…
Reference in a new issue