eos_vrf_global
Resource module to configure VRF definitions
Collection: arista.eos
Full Name: arista.eos.eos_vrf_global
Controller module — runs on the local controller, not on remote hosts.
Synopsis
Resource module to configure VRF definitions
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| config | list | |||
| running_config | str | |||
| state | str | merged |
Example
yaml
# Using merged
#
# Before state:
# -------------
#
# test#show running-config | section ^vrf
- name: Merge provided configuration with device configuration
arista.eos.eos_vrf_global:
config:
- name: VRF4
description: VRF4 Description
rd: "3:4"
state: merged
# Task Output:
# ------------
#
# before: []
#
# commands:
# - vrf instance VRF4
# - description VRF4 Description
# - rd 3:4
#
# after:
# - name: VRF4
# description: VRF4 Description
# rd: "3:4"
#
# After state:
# ------------
#
# test#show running-config | section ^vrf
# vrf instance VRF4
# description "VRF4 Description"
# rd "3:4"
# Using replaced
#
# Before state:
# -------------
#
# test#show running-config | section ^vrf
# vrf instance VRF4
# description "VRF4 Description"
# rd "3:4"
- name: Replace the provided configuration with the existing running configuration
arista.eos.eos_vrf_global:
config:
- name: VRF7
description: VRF7 description
rd: "67:9"
state: replaced
# Task Output:
# ------------
#
# before:
# - name: VRF4
# description: VRF4 Description
# rd: "3:4"
#
# commands:
# - vrf instance VRF7
# - description VRF7 description
# - rd 6:9
#
# after:
# - name: VRF4
# description: VRF4 Description
# rd: "3:4"
# - name: VRF7
# description: VRF7 description
# rd: "6:9"
#
# After state:
# ------------
#
# test#show running-config | section ^vrf
# vrf instance VRF4
# description VRF4 Description
# rd 3:4
# !
# vrf instance VRF7
# description VRF7 description
# rd 6:9
# !
# !
# Using overridden
#
# Before state:
# -------------
#
# test#show running-config | section ^vrf
# vrf instance VRF4
# description VRF4 Description
# rd 3:4
# !
# vrf instance VRF7
# description VRF7 description
# rd 6:9
# !
# !
- name: Override the provided configuration with the existing running configuration
arista.eos.eos_vrf_global:
state: overridden
config:
- name: VRF6
description: VRF6 Description
rd: "9:8"
# Task Output:
# ------------
#
# before:
# - name: VRF4
# description: VRF4 Description
# rd: "3:4"
# - name: VRF7
# description: VRF7 description
# rd: "6:9"
#
# commands:
# - vrf instance VRF4
# - no description VRF4 Description
# - no rd 3:4
# - vrf instance VRF7
# - no description VRF7 description
# - no rd 67:9
# - vrf instance VRF6
# - description VRF6 Description
# - rd 9:8
#
# after:
# - name: VRF4
# - name: VRF6
# description: VRF6 Description
# rd: "9:8"
# - name: VRF7
#
# After state:
# -------------
# test#show running-config | section ^vrf
# vrf instance VRF4
# vrf instance VRF6
# description VRF6 Description
# rd 9:8
# vrf instance VRF7
# Using deleted
#
# Before state:
# -------------
#
# test#show running-config | section ^vrf
# vrf instance VRF4
# vrf instance VRF6
# description VRF6 Description
# rd 9:8
# vrf instance VRF7
- name: Delete the provided configuration
arista.eos.eos_vrf_global:
config:
state: deleted
# Task Output:
# ------------
#
# before:
# - name: VRF4
# - name: VRF6
# description: VRF6 Description
# rd: "9:8"
# - name: VRF7
# commands:
# - vrf instance VRF4
# - vrf instance VRF6
# - no description VRF6 Description
# - no rd 9:8
# - vrf instance VRF7
#
# after:
# - name: VRF4
# - name: VRF6
# - name: VRF7
#
# After state:
# ------------
#
# test#show running-config | section ^vrf
# vrf instance VRF4
# vrf instance VRF6
# vrf instance VRF7
# Using purged
#
# Before state:
# -------------
#
# test#show running-config | section ^vrf
# vrf instance VRF4
# vrf instance VRF6
# vrf instance VRF7
- name: Purge all the configuration from the device
arista.eos.eos_vrf_global:
state: purged
# Task Output:
# ------------
#
# before:
# - name: VRF4
# - name: VRF6
# - name: VRF7
#
# commands:
# - no vrf instance VRF4
# - no vrf instance VRF6
# - no vrf instance VRF7
#
# after: []
#
# After state:
# -------------
# test#show running-config | section ^vrf
# -
# Using rendered
#
- name: Render provided configuration with device configuration
arista.eos.eos_vrf_global:
config:
- name: VRF4
description: VRF4 Description
rd: "3:4"
state: rendered
# Task Output:
# ------------
#
# rendered:
# - vrf instance VRF4
# - description VRF4 Description
# - rd 3:4
# Using gathered
#
# Before state:
# -------------
#
# test#show running-config | section ^vrf
# vrf instance VRF4
# description "VRF4 Description"
# rd "3:4"
- name: Gather existing running configuration
arista.eos.eos_vrf_global:
state: gathered
# Task Output:
# ------------
#
# gathered:
# - name: VRF4
# description: VRF4 Description
# rd: "3:4"
# Using parsed
#
# File: parsed.cfg
# ----------------
#
# vrf instance test
# description "This is test VRF"
# rd "testing"
# !
# !
# vrf my_vrf
# description "this is sample vrf for feature testing"
# rd "2:3"
# !
# !
- name: Parse the provided configuration
arista.eos.eos_vrf_global:
running_config: "{{ lookup('file', 'parsed.cfg') }}"
state: parsed
# Task Output:
# ------------
#
# parsed:
# - description: This is test VRF
# name: test
# rd: testing
# - description: this is sample vrf for feature testing
# name: my_vrf
# rd: '2:3'