Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed the proxmox_kvm.py filter that prevented update of a network … #49001

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions lib/ansible/modules/cloud/misc/proxmox_kvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@
description:
- If C(yes), the VM will be update with new value.
- Cause of the operations of the API and security reasons, I have disabled the update of the following parameters
- C(net, virtio, ide, sata, scsi). Per example updating C(net) update the MAC address and C(virtio) create always new disk...
- C(virtio, ide, sata, scsi). Per example updating C(virtio) create always new disk...
type: bool
default: 'no'
validate_certs:
Expand Down Expand Up @@ -689,7 +689,7 @@ def create_vm(module, proxmox, vmid, newid, node, name, memory, cpu, cores, sock
if p in kwargs:
del kwargs[p]

# If update, don't update disk (virtio, ide, sata, scsi) and network interface
# If update, don't update disk (virtio, ide, sata, scsi)
if update:
if 'virtio' in kwargs:
del kwargs['virtio']
Expand All @@ -699,8 +699,6 @@ def create_vm(module, proxmox, vmid, newid, node, name, memory, cpu, cores, sock
del kwargs['scsi']
if 'ide' in kwargs:
del kwargs['ide']
if 'net' in kwargs:
del kwargs['net']

# 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]
for k in kwargs.keys():
Expand Down