From dca4d8f6586414611fe174382a44554a8cde775f Mon Sep 17 00:00:00 2001 From: Alexis La Goutte Date: Thu, 16 Feb 2023 11:31:30 +0000 Subject: [PATCH] vrf: Add rd parameter Fix #56 --- plugins/modules/aoscx_vrf.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/modules/aoscx_vrf.py b/plugins/modules/aoscx_vrf.py index 4a22739..6aa9493 100644 --- a/plugins/modules/aoscx_vrf.py +++ b/plugins/modules/aoscx_vrf.py @@ -76,6 +76,7 @@ def main(): module_args = dict( name=dict(type="str", required=True), + rd=dict(type="str", required=False), state=dict(default="create", choices=["create", "delete"]), ) if USE_PYAOSCX_SDK: @@ -87,6 +88,7 @@ def main(): # Set Variables vrf_name = ansible_module.params["name"] + rd = ansible_module.params["rd"] state = ansible_module.params["state"] result = dict(changed=False) @@ -109,6 +111,8 @@ def main(): if state == "create": # Create VRF with incoming attributes vrf = device.vrf(vrf_name) + vrf.rd = rd + vrf.apply() # Changed result["changed"] = vrf.was_modified()