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

proxmox_nic: set mtu on interface even if it's not virtio (#2505) (#2507)

* Set mtu on interface whatsoever

* add changelog fragment

* Revert "add changelog fragment"

This reverts commit 5f2f1e7feb.

(cherry picked from commit e2dfd42dd4)

Co-authored-by: Amin Vakil <info@aminvakil.com>
This commit is contained in:
patchback[bot] 2021-05-14 16:24:47 +02:00 committed by GitHub
parent bf185573a6
commit e78517ca93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -211,9 +211,8 @@ def update_nic(module, proxmox, vmid, interface, model, **kwargs):
config_provided += ',link_down=1'
if kwargs['mtu']:
if model == 'virtio':
config_provided += ",mtu={0}".format(kwargs['mtu'])
else:
if model != 'virtio':
module.warn(
'Ignoring MTU for nic {0} on VM with vmid {1}, '
'model should be set to \'virtio\': '.format(interface, vmid))