junipernetworks / junipernetworks.junos / 8.0.0 / module / junos_vrf Manage the VRF definitions on Juniper JUNOS devices | "added in version" 1.0.0 of junipernetworks.junos" Authors: Ganesh Nalawade (@ganeshrn)junipernetworks.junos.junos_vrf (8.0.0) — module
Install with ansible-galaxy collection install junipernetworks.junos:==8.0.0
collections: - name: junipernetworks.junos version: 8.0.0
This module provides declarative management of VRF definitions on Juniper JUNOS devices. It allows playbooks to manage individual or the entire VRF collection.
- name: Configure vrf configuration junipernetworks.junos.junos_vrf: name: test-1 description: test-vrf-1 interfaces: - ge-0/0/3 - ge-0/0/2 rd: 192.0.2.1:10 target: target:65514:113 state: present
- name: Remove vrf configuration junipernetworks.junos.junos_vrf: name: test-1 description: test-vrf-1 interfaces: - ge-0/0/3 - ge-0/0/2 rd: 192.0.2.1:10 target: target:65514:113 state: absent
- name: Deactivate vrf configuration junipernetworks.junos.junos_vrf: name: test-1 description: test-vrf-1 interfaces: - ge-0/0/3 - ge-0/0/2 rd: 192.0.2.1:10 target: target:65514:113 active: false
- name: Activate vrf configuration junipernetworks.junos.junos_vrf: name: test-1 description: test-vrf-1 interfaces: - ge-0/0/3 - ge-0/0/2 rd: 192.0.2.1:10 target: target:65514:113 active: true
- name: Create vrf using aggregate junipernetworks.junos.junos_vrf: aggregate: - name: test-1 description: test-vrf-1 interfaces: - ge-0/0/3 - ge-0/0/2 rd: 192.0.2.1:10 target: target:65514:113 - name: test-2 description: test-vrf-2 interfaces: - ge-0/0/4 - ge-0/0/5 rd: 192.0.2.2:10 target: target:65515:114 state: present
rd: description: - The router-distinguisher value uniquely identifies the VRF to routing processes on the remote IOS system. The RD value takes the form of C(A:B) where C(A) and C(B) are both numeric values. elements: str type: list name: description: - The name of the VRF definition to be managed on the remote IOS device. The VRF definition name is an ASCII string name used to uniquely identify the VRF. This argument is mutually exclusive with the C(aggregate) argument type: str state: choices: - present - absent default: present description: - Configures the state of the VRF definition as it relates to the device operational configuration. When set to I(present), the VRF should be configured in the device active configuration and when set to I(absent) the VRF should not be in the device active configuration type: str active: default: true description: - Specifies whether or not the configuration is active or deactivated type: bool target: description: - It configures VRF target community configuration. The target value takes the form of C(target:A:B) where C(A) and C(B) are both numeric values. elements: str type: list aggregate: description: - The set of VRF definition objects to be configured on the remote JUNOS device. Ths list entries can either be the VRF name or a hash of VRF definitions and attributes. This argument is mutually exclusive with the C(name) argument. elements: dict suboptions: active: description: - Specifies whether or not the configuration is active or deactivated type: bool description: description: - Provides a short description of the VRF definition in the current active configuration. The VRF definition value accepts alphanumeric characters used to provide additional information about the VRF. type: str 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. elements: str type: list name: description: - The name of the VRF definition to be managed on the remote IOS device. The VRF definition name is an ASCII string name used to uniquely identify the VRF. This argument is mutually exclusive with the C(aggregate) argument required: true type: str rd: description: - The router-distinguisher value uniquely identifies the VRF to routing processes on the remote IOS system. The RD value takes the form of C(A:B) where C(A) and C(B) are both numeric values. elements: str type: list state: choices: - present - absent description: - Configures the state of the VRF definition as it relates to the device operational configuration. When set to I(present), the VRF should be configured in the device active configuration and when set to I(absent) the VRF should not be in the device active configuration type: str table_label: description: - Causes JUNOS to allocate a VPN label per VRF rather than per VPN FEC. This allows for forwarding of traffic to directly connected subnets, COS Egress filtering etc. type: bool target: description: - It configures VRF target community configuration. The target value takes the form of C(target:A:B) where C(A) and C(B) are both numeric values. elements: str type: list type: list 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. elements: str type: list description: description: - Provides a short description of the VRF definition in the current active configuration. The VRF definition value accepts alphanumeric characters used to provide additional information about the VRF. type: str table_label: default: true description: - Causes JUNOS to allocate a VPN label per VRF rather than per VPN FEC. This allows for forwarding of traffic to directly connected subnets, COS Egress filtering etc. type: bool
diff.prepared: description: Configuration difference before and after applying change. returned: when configuration is changed and diff option is enabled. sample: '[edit routing-instances] + test-1 { + description test-vrf-1; + instance-type vrf; + interface ge-0/0/2.0; + interface ge-0/0/3.0; + route-distinguisher 192.0.2.1:10; + vrf-target target:65514:113; + } ' type: str