mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-23 10:51:24 -07:00
* fix dummy interface bug
* fix dummy interface bug
* Update nmcli.py
* Update nmcli.py
* Update nmcli.py
* Update nmcli.py
* adding tests and requested conditional
* Fix pylint problems and remove 2 lines from previous version of bugfix
* Fix pep8 issue
* add changelog
* Update changelogs/fragments/3625-nmcli_false_changed_mtu_fix.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 85085bcd53
)
Co-authored-by: Alex Groshev <38885591+haddystuff@users.noreply.github.com>
This commit is contained in:
parent
0e3c1f867d
commit
4fd7a65a52
3 changed files with 107 additions and 0 deletions
|
@ -1695,6 +1695,8 @@ class Nmcli(object):
|
|||
# Depending on version nmcli adds double-qoutes to gsm.apn
|
||||
# Need to strip them in order to compare both
|
||||
current_value = current_value.strip('"')
|
||||
if key == self.mtu_setting and self.mtu is None:
|
||||
self.mtu = 0
|
||||
else:
|
||||
# parameter does not exist
|
||||
current_value = None
|
||||
|
@ -1703,6 +1705,8 @@ class Nmcli(object):
|
|||
# compare values between two lists
|
||||
if sorted(current_value) != sorted(value):
|
||||
changed = True
|
||||
elif all([key == self.mtu_setting, self.type == 'dummy', current_value is None, value == 'auto', self.mtu is None]):
|
||||
value = None
|
||||
else:
|
||||
if current_value != to_text(value):
|
||||
changed = True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue