mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-26 21:33:12 +00:00
nictagadm: don't call is_valid_mac when etherstub is true (#11589)
* nictagadm: don't call is_valid_mac when etherstub is true * Add changelog fragment * update changelog fragment * Shorten changelog fragement * Update changelogs/fragments/nictagadm-etherstub-nonetype-bugfix.yml Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
bugfixes:
|
||||||
|
- nictagadm - add a condition to the if statement so that ``is_valid_mac()`` does not get called if ``etherstub`` is false
|
||||||
|
(https://github.com/ansible-collections/community.general/pull/11589).
|
||||||
@@ -193,7 +193,7 @@ def main():
|
|||||||
state=nictag.state,
|
state=nictag.state,
|
||||||
)
|
)
|
||||||
|
|
||||||
if not nictag.is_valid_mac():
|
if not nictag.etherstub and not nictag.is_valid_mac():
|
||||||
module.fail_json(msg="Invalid MAC Address Value", name=nictag.name, mac=nictag.mac, etherstub=nictag.etherstub)
|
module.fail_json(msg="Invalid MAC Address Value", name=nictag.name, mac=nictag.mac, etherstub=nictag.etherstub)
|
||||||
|
|
||||||
if nictag.state == "absent":
|
if nictag.state == "absent":
|
||||||
|
|||||||
Reference in New Issue
Block a user