mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-22 05:09:12 +00:00
[PR #11551/1554f23b backport][stable-12] nmcli: fix idempotency issue with macvlan (#11566)
nmcli: fix idempotency issue with macvlan (#11551)
* nmcli: fix idempotency issue with macvlan
The nmcli module is not idempotent for macvlan interfaces.
Ansible running in diff mode for a case where the interface in question
already exists:
```
TASK [nm_macvlan : Check macvlan connection] *********************************************************************************
--- before
+++ after
@@ -11,5 +11,5 @@
"ipv6.method": "disabled",
"macvlan.mode": "2",
"macvlan.parent": "eth0",
- "macvlan.tap": "no"
+ "macvlan.tap": "False"
}
```
The problem is that `macvlan.tap` isn't treated as boolean option. Fix it.
* Update changelogs/fragments/11551-fix-nmcli-idempotency-for-macvlan.yml
---------
(cherry picked from commit 1554f23bfb)
Co-authored-by: Martin Wilck <mwilck@suse.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
fc5de1a194
commit
b3782a76e0
2 changed files with 5 additions and 0 deletions
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
minor_changes:
|
||||
- nmcli - fix idempotency for MAC VLAN interfaces when using ``macvlan.tap``
|
||||
(https://github.com/ansible-collections/community.general/pull/11551).
|
||||
|
|
@ -2357,6 +2357,7 @@ class Nmcli:
|
|||
"ipv6.ignore-auto-routes",
|
||||
"802-11-wireless.hidden",
|
||||
"team.runner-fast-rate",
|
||||
"macvlan.tap",
|
||||
}:
|
||||
return bool
|
||||
elif setting in {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue