-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
156 additions
and
142 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,156 @@ | ||
module: iosxr_vrfs | ||
short_description: Manages global VRF configuration. | ||
description: | ||
- This module manages VRF configurations on Cisco IOS-XR devices. It enables playbooks to handle either individual VRFs or the complete VRF collection. It also permits removing non-explicitly stated VRF definitions from the setup. | ||
version_added: 7.2.0 | ||
author: Ruchi Pakhle (@Ruchip16) | ||
notes: | ||
- Tested against Cisco IOSXR Version 7.2.0 | ||
- This module works with connection C(network_cli). See L(the IOS_XR Platform Options,../network/user_guide/platform_iosxr.html) | ||
- 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 Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_. | ||
options: | ||
config: | ||
description: A list of device configurations for VRF. | ||
type: list | ||
elements: dict | ||
suboptions: | ||
name: | ||
description: Name of the VRF. | ||
type: str | ||
required: true | ||
description: | ||
description: A description for the VRF. | ||
type: str | ||
address_families: | ||
description: Enable address family and enter its config mode - AFI/SAFI configuration | ||
type: list | ||
elements: dict | ||
suboptions: | ||
afi: | ||
description: Address Family Identifier (AFI) | ||
type: str | ||
choices: ['ipv4', 'ipv6'] | ||
safi: | ||
description: Address Family modifier | ||
type: str | ||
choices: [ 'flowspec', 'multicast', 'unicast'] | ||
export: | ||
description: VRF export | ||
type: dict | ||
suboptions: | ||
route_policy: &route_policy | ||
description: Use route_policy for export | ||
type: str | ||
route_target: &route_target | ||
description: Specify export route target extended communities. | ||
type: str | ||
to: | ||
description: Export routes to a VRF | ||
type: dict | ||
suboptions: | ||
default_vrf: &default_vrf | ||
description: Export routes to default VRF | ||
type: dict | ||
suboptions: | ||
route_policy: *route_policy | ||
vrf: | ||
description: Export routes to a VRF | ||
type: dict | ||
suboptions: | ||
allow_imported_vpn: | ||
description: Allow export of imported VPN routes to non-default VRF | ||
type: bool | ||
import_config: | ||
description: VRF import | ||
type: dict | ||
suboptions: | ||
route_policy: *route_policy | ||
route_target: *route_target | ||
from: | ||
description: Import routes from a VRF | ||
type: dict | ||
suboptions: | ||
bridge_domain: | ||
description: VRF import | ||
type: dict | ||
suboptions: | ||
advertise_as_vpn: &advertise_as_vpn | ||
description: Advertise local EVPN imported routes to PEs | ||
type: bool | ||
default_vrf: *default_vrf | ||
vrf: | ||
description: Import routes from a VRF | ||
type: dict | ||
suboptions: | ||
advertise_as_vpn: *advertise_as_vpn | ||
maximum: | ||
description: Set maximum prefix limit | ||
type: dict | ||
suboptions: | ||
prefix: | ||
description: Set table's maximum prefix limit. | ||
type: int | ||
evpn_route_sync: | ||
description: EVPN Instance VPN ID used to synchronize the VRF route(s). | ||
type: int | ||
fallback_vrf: | ||
description: Fallback VRF name | ||
type: str | ||
mhost: | ||
description: Multicast host stack options | ||
type: dict | ||
suboptions: | ||
afi: | ||
description: Address Family Identifier (AFI) | ||
type: str | ||
choices: ['ipv4', 'ipv6'] | ||
default_interface: | ||
description: Default interface for multicast. | ||
type: str | ||
rd: | ||
description: VPN Route Distinguisher (RD). | ||
type: str | ||
remote_route_filtering: | ||
description: Enable/Disable remote route filtering per VRF | ||
type: dict | ||
suboptions: | ||
disable: | ||
description: Disable remote route filtering per VRF | ||
type: bool | ||
vpn: | ||
description: VPN ID for the VRF | ||
type: dict | ||
suboptions: | ||
id: | ||
description: VPN ID for the VRF. | ||
type: str | ||
running_config: | ||
description: | ||
- This option is used only with state I(parsed). | ||
- The value of this option should be the output received from the IOS-XR device by | ||
executing the command B(show running-config vrf). | ||
- The state I(parsed) reads the configuration from C(running_config) option and | ||
transforms it into Ansible structured data as per the resource module's argspec | ||
and the value is then returned in the I(parsed) key within the result. | ||
type: str | ||
state: | ||
choices: [parsed, gathered, deleted, merged, replaced, rendered, overridden] | ||
default: merged | ||
description: | ||
- The state the configuration should be left in | ||
- The states I(rendered), I(gathered) and I(parsed) does not perform any change | ||
on the device. | ||
- The state I(rendered) will transform the configuration in C(config) option to | ||
platform specific CLI commands which will be returned in the I(rendered) key | ||
within the result. For state I(rendered) active connection to remote host is | ||
not required. | ||
- The state I(gathered) will fetch the running configuration from device and transform | ||
it into structured data in the format as per the resource module argspec and | ||
the value is returned in the I(gathered) key within the result. | ||
- The state I(parsed) reads the configuration from C(running_config) option and | ||
transforms it into JSON format as per the resource module parameters and the | ||
value is returned in the I(parsed) key within the result. The value of C(running_config) | ||
option should be the same format as the output of command I(show running-config vrf). | ||
connection to remote host is not required. | ||
type: str |