dellemc / dellemc.enterprise_sonic / 2.4.0 / module / sonic_vrfs Manage VRFs and associate VRFs to interfaces such as, Eth, LAG, VLAN, and loopback | "added in version" 1.0.0 of dellemc.enterprise_sonic" Authors: Abirami N (@abirami-n) This plugin has a corresponding action plugin.dellemc.enterprise_sonic.sonic_vrfs (2.4.0) — module
Install with ansible-galaxy collection install dellemc.enterprise_sonic:==2.4.0
collections: - name: dellemc.enterprise_sonic version: 2.4.0
Manages VRF and VRF interface attributes in Enterprise SONiC Distribution by Dell Technologies.
# Using deleted # # Before state: # ------------- # #show ip vrf #VRF-NAME INTERFACES #---------------------------------------------------------------- #Vrfcheck1 #Vrfcheck2 #Vrfcheck3 Eth1/3 # Eth1/14 # Eth1/16 # Eth1/17 #Vrfcheck4 Eth1/5 # Eth1/6 # - name: Configuring vrf deleted state dellemc.enterprise_sonic.sonic_vrfs: config: - name: Vrfcheck4 members: interfaces: - name: Eth1/6 - name: Vrfcheck3 members: interfaces: - name: Eth1/3 - name: Eth1/14 state: deleted
# # After state: # ------------ # #show ip vrf #VRF-NAME INTERFACES #---------------------------------------------------------------- #Vrfcheck1 #Vrfcheck2 #Vrfcheck3 Eth1/16 # Eth1/17 #Vrfcheck4 Eth1/5 # # # Using merged # # Before state: # ------------- # #show ip vrf #VRF-NAME INTERFACES #---------------------------------------------------------------- #Vrfcheck1 #Vrfcheck2 #Vrfcheck3 Eth1/16 # Eth1/17 #Vrfcheck4 # - name: Configuring vrf merged state dellemc.enterprise_sonic.sonic_vrfs: config: - name: Vrfcheck4 members: interfaces: - name: Eth1/5 - name: Eth1/6 - name: Vrfcheck3 members: interfaces: - name: Eth1/3 - name: Eth1/14 state: merged
# # After state: # ------------ # #show ip vrf #VRF-NAME INTERFACES #---------------------------------------------------------------- #Vrfcheck1 #Vrfcheck2 #Vrfcheck3 Eth1/3 # Eth1/14 # Eth1/16 # Eth1/17 #Vrfcheck4 Eth1/5 # Eth1/6 # # Using overridden # # Before state: # ------------- # #show ip vrf #VRF-NAME INTERFACES #---------------------------------------------------------------- #Vrfcheck1 #Vrfcheck2 #Vrfcheck3 Eth1/7 # Eth1/8 # - name: Overridden VRF configuration dellemc.enterprise_sonic.sonic_vrfs: sonic_vrfs: config: - name: Vrfcheck1 members: interfaces: - name: Eth1/3 - name: Eth1/14 - name: Vrfcheck3 members: interfaces: - name: Eth1/5 - name: Eth1/6 state: overridden
# # After state: # ------------ # #show ip vrf #VRF-NAME INTERFACES #---------------------------------------------------------------- #Vrfcheck1 Eth1/3 # Eth1/14 #Vrfcheck2 #Vrfcheck3 Eth1/5 # Eth1/6 # # Using replaced # # Before state: # ------------- # #show ip vrf #VRF-NAME INTERFACES #---------------------------------------------------------------- #Vrfcheck1 Eth1/3 #Vrfcheck2 #Vrfcheck3 Eth1/5 # Eth1/6 # - name: Replace VRF configuration dellemc.enterprise_sonic.sonic_vrfs: sonic_vrfs: config: - name: Vrfcheck1 members: interfaces: - name: Eth1/3 - name: Eth1/14 - name: Vrfcheck3 members: interfaces: - name: Eth1/5 - name: Eth1/6 state: replaced
state: choices: - merged - replaced - overridden - deleted default: merged description: The state of the configuration after module completion. type: str config: description: A list of VRF configurations. elements: dict suboptions: members: description: Holds a dictionary mapping of list of interfaces linked to a VRF interface. suboptions: interfaces: description: List of interface names that are linked to a specific VRF interface. elements: dict suboptions: name: description: The name of the physical interface. type: str type: list type: dict name: description: The name of the VRF interface. required: true type: str type: list
after: description: The resulting configuration model invocation. returned: when changed sample: 'The configuration returned is always in the same format of the parameters above. ' type: list before: description: The configuration prior to the model invocation. returned: always sample: 'The configuration returned is always in the same format of the parameters above. ' type: list commands: description: The set of commands pushed to the remote device. returned: always sample: - command 1 - command 2 - command 3 type: list