mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-21 20:59:10 +00:00
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
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
2f33ff1041
commit
1554f23bfb
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",
|
"ipv6.ignore-auto-routes",
|
||||||
"802-11-wireless.hidden",
|
"802-11-wireless.hidden",
|
||||||
"team.runner-fast-rate",
|
"team.runner-fast-rate",
|
||||||
|
"macvlan.tap",
|
||||||
}:
|
}:
|
||||||
return bool
|
return bool
|
||||||
elif setting in {
|
elif setting in {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue