1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-03-22 13:19:13 +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:
patchback[bot] 2026-03-10 22:00:44 +01:00 committed by GitHub
parent fc5de1a194
commit b3782a76e0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View file

@ -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 {