Manage the VRF definitions on Juniper JUNOS devices
Version added: 1.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.
The below requirements are needed on the host that executes this module.
- ncclient (>=v0.5.2)
Note
- This module requires the netconf system service be enabled on the remote device being managed.
- Tested against vSRX JUNOS version 15.1X49-D15.4, vqfx-10000 JUNOS Version 15.1X53-D60.4.
- Recommended connection is
netconf
. See the Junos OS Platform Options. - This module also works with
local
connections for legacy playbooks. - For information on using CLI and netconf see the :ref:`Junos OS Platform Options guide <junos_platform_options>`
- For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
- For more information on using Ansible to manage Juniper network devices see https://www.ansible.com/ansible-juniper.
- 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
Common return values are documented here, the following are the fields unique to this module:
- Ganesh Nalawade (@ganeshrn)