From a111eabeb10ff6800183ec9ac8654b5969a9c789 Mon Sep 17 00:00:00 2001 From: Alexis La Goutte Date: Mon, 13 Nov 2023 08:22:56 +0100 Subject: [PATCH] aoscx_vrf: use return of apply() function to set modified(changed) or not --- plugins/modules/aoscx_vrf.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/modules/aoscx_vrf.py b/plugins/modules/aoscx_vrf.py index 644d522..76ad6fe 100644 --- a/plugins/modules/aoscx_vrf.py +++ b/plugins/modules/aoscx_vrf.py @@ -142,10 +142,9 @@ def main(): ansible_module.fail_json(msg=str(e)) # Configure RD (Route Distinguisher) - if rd: - modified |= vrf.rd != rd + if rd:g vrf.rd = rd - vrf.apply() + modified |= vrf.apply() result["changed"] = modified ansible_module.exit_json(**result)