Skip to content

Commit

Permalink
vrf: Add rd parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
alagoutte committed Jun 13, 2023
1 parent de5c759 commit e5cdf95
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/modules/aoscx_vrf.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,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"]),
)
# ArubaModule
Expand All @@ -71,6 +72,7 @@ def main():
# Set Variables
vrf_name = ansible_module.params["name"]
state = ansible_module.params["state"]
rd = ansible_module.params["rd"]

result = dict(changed=False)

Expand Down Expand Up @@ -102,6 +104,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()

Expand Down

0 comments on commit e5cdf95

Please sign in to comment.