community / community.general / 0.1.1 / module / cnos_vrf Manage VRFs on Lenovo CNOS network devices Authors: Anil Kumar Muraleedharan (@amuraleedhar) preview | supported by communitycommunity.general.cnos_vrf (0.1.1) — module
Install with ansible-galaxy collection install community.general:==0.1.1
collections: - name: community.general version: 0.1.1
This module provides declarative management of VRFs on Lenovo CNOS network devices.
- name: Create vrf cnos_vrf: name: test rd: 1:200 interfaces: - Ethernet1/33 state: present
- name: Delete VRFs cnos_vrf: name: test state: absent
- name: Create aggregate of VRFs with purge cnos_vrf: aggregate: - { name: test4, rd: "1:204" } - { name: test5, rd: "1:205" } state: present purge: yes
- name: Delete aggregate of VRFs cnos_vrf: aggregate: - name: test2 - name: test3 - name: test4 - name: test5 state: absent
rd: description: - Route distinguisher of the VRF name: description: - Name of the VRF. required: true delay: default: 10 description: - Time in seconds to wait before checking for the operational state on remote device. This wait is applicable for operational state arguments. purge: default: false description: - Purge VRFs not defined in the I(aggregate) parameter. type: bool state: choices: - present - absent default: present description: - State of the VRF configuration. aggregate: description: List of VRFs contexts interfaces: description: - Identifies the set of interfaces that should be configured in the VRF. Interfaces must be routed interfaces in order to be placed into a VRF. The name of interface should be in expanded format and not abbreviated. associated_interfaces: description: - This is a intent option and checks the operational state of the for given vrf C(name) for associated interfaces. If the value in the C(associated_interfaces) does not match with the operational state of vrf interfaces on device it will result in failure.
commands: description: The list of configuration mode commands to send to the device returned: always sample: - vrf context test - rd 1:100 - interface Ethernet1/44 - vrf member test type: list