mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
added usb support to proxmox module (#8199)
* added usb support to proxmox module * forgot docs * fixed net refrances * changed usb to USB * added changelog fragment Co-authored-by: Felix Fontein <felix@fontein.de> * added changelog fragment * corrected spelling and punctuation Co-authored-by: Felix Fontein <felix@fontein.de> * Another one. --------- Co-authored-by: ripplefcl <ripple@ripplefcl.com> Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
bebe162a22
commit
861f55eb04
2 changed files with 15 additions and 1 deletions
|
@ -0,0 +1,2 @@
|
|||
minor_changes:
|
||||
- "proxmox_kvm - adds``usb`` parameter for setting USB devices on proxmox KVM VMs (https://github.com/ansible-collections/community.general/pull/8199)."
|
|
@ -519,6 +519,16 @@ options:
|
|||
default: '2.0'
|
||||
type: dict
|
||||
version_added: 7.1.0
|
||||
usb:
|
||||
description:
|
||||
- A hash/dictionary of USB devices for the VM. O(usb='{"key":"value", "key":"value"}').
|
||||
- Keys allowed are - C(usb[n]) where 0 ≤ n ≤ N.
|
||||
- Values allowed are - C(host="value|spice",mapping="value",usb3="1|0").
|
||||
- host is either C(spice) or the USB id/port.
|
||||
- Option C(mapping) is the mapped USB device name.
|
||||
- Option C(usb3) enables USB 3 support.
|
||||
type: dict
|
||||
version_added: 9.0.0
|
||||
update:
|
||||
description:
|
||||
- If V(true), the VM will be updated with new value.
|
||||
|
@ -1094,7 +1104,7 @@ class ProxmoxKvmAnsible(ProxmoxAnsible):
|
|||
)
|
||||
|
||||
# Convert all dict in kwargs to elements.
|
||||
# For hostpci[n], ide[n], net[n], numa[n], parallel[n], sata[n], scsi[n], serial[n], virtio[n], ipconfig[n]
|
||||
# For hostpci[n], ide[n], net[n], numa[n], parallel[n], sata[n], scsi[n], serial[n], virtio[n], ipconfig[n], usb[n]
|
||||
for k in list(kwargs.keys()):
|
||||
if isinstance(kwargs[k], dict):
|
||||
kwargs.update(kwargs[k])
|
||||
|
@ -1311,6 +1321,7 @@ def main():
|
|||
storage=dict(type='str', required=True),
|
||||
version=dict(type='str', choices=['2.0', '1.2'], default='2.0')
|
||||
)),
|
||||
usb=dict(type='dict'),
|
||||
update=dict(type='bool', default=False),
|
||||
update_unsafe=dict(type='bool', default=False),
|
||||
vcpus=dict(type='int'),
|
||||
|
@ -1516,6 +1527,7 @@ def main():
|
|||
tdf=module.params['tdf'],
|
||||
template=module.params['template'],
|
||||
tpmstate0=module.params['tpmstate0'],
|
||||
usb=module.params['usb'],
|
||||
vcpus=module.params['vcpus'],
|
||||
vga=module.params['vga'],
|
||||
virtio=module.params['virtio'],
|
||||
|
|
Loading…
Reference in a new issue