From a8e5dac21090e9b0ddf876214a9a1522079ecde1 Mon Sep 17 00:00:00 2001 From: omnom62 <75066712+omnom62@users.noreply.github.com> Date: Wed, 4 Mar 2026 19:51:16 +1000 Subject: T6836 VRF module (#408) * t6836 vfr module init * argspec facts module for VRF * T6834 static_route module to support interface_route (#398) * t6834 init * facts fixes, WIP * T6834 - facts updates * static_routes 1.3- config, facts, args and sanit and unit tests * changelog * changelog updates * static_routes 1.4+ * static_routes v1.4 unit tests * comment removed * T6829 (area interfaces in OSPFv3 1.3-1.5) re-init (#399) * T6829 re-init * re-init T6829 ospfv3 area interface for 1.3- * changelog * changelog fix * Doc is updated * adding 1.4+ support * ospfv3 area interfaces for 1.4+ * fixed ospfv3 facts and added area interface unit test for 1.4 * ospfv3 clean-up * doc updates * Resolve merge conflicts * vrf parsers set_table * more vrf paresers added * vrf facts main code * vrf data structures * simple vrf config push * simple vrf config push * some work on vrf * basic facts done * vrf instance parsers wif * ongoing parser testing * vrf dev work * testing with paresers * all basic settings * merged for vrf * more states for VRF * vrf deleted, overriden * overriden * sanity * rst for vrf * changelog * fix changelog * doc fix * vrf delete idempotent * deleted and overridden for VFR * overriden * overriden vrf idempotency * asdvanced vrf settings * afi for VRF facts * VRF AFI config * VRF AFI tests * vrf dev work * afi dev work * afi and deep_merge fixes for VRF * afi basic provisioning * changelog * vrf sanity fixes * VRF AFI protocols and route-maps * vrf parsed, gathered, rendered fixes * docstrings VRF * docstrings VRF * docstring VRF * module doc update * vrf module examples * VRF doc examples * linter * VRF unit tests init * VRF unit tests init * VRF unit tests updates * fixed VRF overridden and deleted unit test cases * VRF integration tests init * VRF int tests rtt, merged, replaced * VRF int testt gathered, rendered * VRF int tests deleted, rendered, overridden and empty_config * linter * VRF int test misc fixes * VRF global idepmotency * fixing py3.13 runner deps * fixing lint * fixing sanity * reverting previous fixes * VRF protocols load_module and provisioning flow * fixes to bgp VRF protocol methods * VRF protocol facts init * VRF protocol load_module works * reworked VRF load_module routine * vrf protocl static fixed * Fixed static and ospf VRF protocol provisioning * Fixed static and ospf VRF protocol provisioning * VRF doc update * VRF docs update * VRF doc updates * unit tests for VRF protocols * VRF BGP protcol sanity check * VRF protocol fixed sanity checks (DOCUMENTATION) * sanity and doc for VRF fixed * VRF unit tests mock * VRF protocol integration parsed, rtt and merged init * VRF protocols - rendered, overridden * VRF protocols replaced * fix accidental changes to test_vyos_config.py * PR description * fix image * README fix * Fixing linter * Mid-result UAT overriden VRF * Mid-result for VRF UAT * VRF uat * VRF obsolete features removed --- docs/vyos.vyos.vyos_config_module.rst | 41 + docs/vyos.vyos.vyos_vrf_module.rst | 5087 +++++++++++++++++++++++++++++++++ 2 files changed, 5128 insertions(+) create mode 100644 docs/vyos.vyos.vyos_vrf_module.rst (limited to 'docs') diff --git a/docs/vyos.vyos.vyos_config_module.rst b/docs/vyos.vyos.vyos_config_module.rst index 1efbd38f..e2be25b9 100644 --- a/docs/vyos.vyos.vyos_config_module.rst +++ b/docs/vyos.vyos.vyos_config_module.rst @@ -131,6 +131,42 @@ Parameters
The config argument specifies the base configuration to use to compare against the desired configuration. If this value is not specified, the module will automatically retrieve the current active configuration from the remote device. The configuration lines in the option value should be similar to how it will appear if present in the running-configuration of the device including indentation to ensure idempotency and correct diff.
+ + +
+ confirm + +
+ string +
+ + + + + +
The confirm argument will tell vyos to revert to the previous configuration if not explicitly confirmed after applying the new config. When set to automatic this module will automatically confirm the configuration, if the current session remains working with the new config. When set to manual, this module does not issue the confirmation itself.
+ + + + +
+ confirm_timeout + +
+ integer +
+ + + Default:
10
+ + +
Minutes to wait for confirmation before reverting the configuration. Does not apply when confirm is set to none .
+ +
@@ -236,6 +272,11 @@ Examples vyos.vyos.vyos_config: src: vyos_template.j2 + - name: revert after ten minutes, if connection is lost + vyos.vyos.vyos_config: + src: vyos_template.j2 + confirm: automatic + - name: for idempotency, use full-form commands vyos.vyos.vyos_config: lines: diff --git a/docs/vyos.vyos.vyos_vrf_module.rst b/docs/vyos.vyos.vyos_vrf_module.rst new file mode 100644 index 00000000..a3fad8a3 --- /dev/null +++ b/docs/vyos.vyos.vyos_vrf_module.rst @@ -0,0 +1,5087 @@ +.. _vyos.vyos.vyos_vrf_module: + + +****************** +vyos.vyos.vyos_vrf +****************** + +**VRF resource module** + + +Version added: 1.0.0 + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- +- This module manages vrf configuration on devices running Vyos + + + + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ config + +
+ dictionary +
+
+ +
List of vrf configuration.
+
+
+ bind_to_all + +
+ boolean +
+
+
    Choices: +
  • no ←
  • +
  • yes
  • +
+
+
Enable binding services to all VRFs
+
+
+ instances + +
+ list + / elements=dictionary +
+
+ +
Virtual Routing and Forwarding instance
+
+
+ address_family + +
+ list + / elements=dictionary +
+
+ +
Address family configuration
+
+
+ afi + +
+ string +
+
+
    Choices: +
  • ipv4
  • +
  • ipv6
  • +
+
+
Address family identifier
+
+
+ disable_forwarding + +
+ boolean +
+
+
    Choices: +
  • no ←
  • +
  • yes
  • +
+
+
Disable forwarding for this address family
+
+
+ nht_no_resolve_via_default + +
+ boolean +
+
+
    Choices: +
  • no ←
  • +
  • yes
  • +
+
+
Disable next-hop resolution via default route
+
+
+ route_maps + +
+ list + / elements=dictionary +
+
+ +
List of route maps for this address family
+
+
+ protocol + +
+ string +
+
+
    Choices: +
  • any
  • +
  • babel
  • +
  • bgp
  • +
  • eigrp
  • +
  • isis
  • +
  • ospf
  • +
  • rip
  • +
  • static
  • +
+
+
Protocol to which the route map applies
+
+
+ rm_name + +
+ string + / required +
+
+ +
Route map name
+
+
+ description + +
+ string +
+
+ +
Description
+
+
+ disable + +
+ boolean +
+
+
    Choices: +
  • no ←
  • +
  • yes
  • +
+
+
Administratively disable interface
+

aliases: disabled
+
+
+ name + +
+ string + / required +
+
+ +
VRF instance name
+
+
+ protocols + +
+ dictionary +
+
+ +
Protocol configuration
+
+
+ bgp + +
+ dictionary +
+
+ +
BGP configuration
+
+
+ as_number + +
+ integer +
+
+ +
AS number.
+
+
+ bgp_params + +
+ dictionary +
+
+ +
BGP parameters
+
+
+ always_compare_med + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Always compare MEDs from different neighbors
+
+
+ bestpath + +
+ dictionary +
+
+ +
Default bestpath selection mechanism
+
+
+ as_path + +
+ string +
+
+
    Choices: +
  • confed
  • +
  • ignore
  • +
+
+
AS-path attribute comparison parameters
+
+
+ compare_routerid + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Compare the router-id for identical EBGP paths
+
+
+ med + +
+ string +
+
+
    Choices: +
  • confed
  • +
  • missing-as-worst
  • +
+
+
MED attribute comparison parameters
+
+
+ cluster_id + +
+ string +
+
+ +
Route-reflector cluster-id
+
+
+ confederation + +
+ list + / elements=dictionary +
+
+ +
AS confederation parameters
+
+
+ identifier + +
+ integer +
+
+ +
Confederation AS identifier
+
+
+ peers + +
+ integer +
+
+ +
Peer ASs in the BGP confederation
+
+
+ dampening + +
+ dictionary +
+
+ +
Enable route-flap dampening
+
+
+ half_life + +
+ integer +
+
+ +
Half-life penalty in seconds
+
+
+ max_suppress_time + +
+ integer +
+
+ +
Maximum duration to suppress a stable route
+
+
+ re_use + +
+ integer +
+
+ +
Time to start reusing a route
+
+
+ start_suppress_time + +
+ integer +
+
+ +
When to start suppressing a route
+
+
+ default + +
+ dictionary +
+
+ +
BGP defaults
+
+
+ local_pref + +
+ integer +
+
+ +
Default local preference
+
+
+ no_ipv4_unicast + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Deactivate IPv4 unicast for a peer by default + Deprecated: Unavailable after 1.4
+
+
+ deterministic_med + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Compare MEDs between different peers in the same AS
+
+
+ disable_network_import_check + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Disable IGP route check for network statements
+
+
+ distance + +
+ list + / elements=dictionary +
+
+ +
Administrative distances for BGP routes
+
+
+ prefix + +
+ integer +
+
+ +
Administrative distance for a specific BGP prefix
+
+
+ type + +
+ string +
+
+
    Choices: +
  • external
  • +
  • internal
  • +
  • local
  • +
+
+
Type of route
+
+
+ value + +
+ integer +
+
+ +
distance
+
+
+ enforce_first_as + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Require first AS in the path to match peer's AS
+
+
+ graceful_restart + +
+ integer +
+
+ +
Maximum time to hold onto restarting peer's stale paths
+
+
+ log_neighbor_changes + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Log neighbor up/down changes and reset reason
+
+
+ no_client_to_client_reflection + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Disable client to client route reflection
+
+
+ no_fast_external_failover + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Disable immediate session reset if peer's connected link goes down
+
+
+ router_id + +
+ string +
+
+ +
BGP router-id
+
+
+ scan_time + +
+ integer +
+
+ +
BGP route scanner interval
+
+
+ neighbor + +
+ list + / elements=dictionary +
+
+ +
BGP neighbor
+
+
+ address + +
+ string +
+
+ +
BGP neighbor address (v4/v6).
+
+
+ advertisement_interval + +
+ integer +
+
+ +
Minimum interval for sending routing updates.
+
+
+ capability + +
+ dictionary +
+
+ +
Advertise capabilities to this neighbor.
+
+
+ dynamic + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Advertise dynamic capability to this neighbor.
+
+
+ extended_nexthop + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Advertise extended nexthop capability to this neighbor.
+
+
+ default_originate + +
+ string +
+
+ +
Send default route to this neighbor
+
+
+ description + +
+ string +
+
+ +
Description of the neighbor
+
+
+ disable_capability_negotiation + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Disbale capability negotiation with the neighbor
+
+
+ disable_connected_check + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Disable check to see if EBGP peer's address is a connected route.
+
+
+ disable_send_community + +
+ string +
+
+
    Choices: +
  • extended
  • +
  • standard
  • +
+
+
Disable sending community attributes to this neighbor.
+
+
+ ebgp_multihop + +
+ integer +
+
+ +
Allow this EBGP neighbor to not be on a directly connected network. Specify the number hops.
+
+
+ local_as + +
+ integer +
+
+ +
local as number not to be prepended to updates from EBGP peers
+
+
+ override_capability + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Ignore capability negotiation with specified neighbor.
+
+
+ passive + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Do not initiate a session with this neighbor
+
+
+ password + +
+ string +
+
+ +
BGP MD5 password
+
+
+ peer_group + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
True if all the configs under this neighbor key is for peer group template.
+
+
+ peer_group_name + +
+ string +
+
+ +
IPv4 peer group for this peer
+
+
+ port + +
+ integer +
+
+ +
Neighbor's BGP port
+
+
+ remote_as + +
+ integer +
+
+ +
Neighbor BGP AS number
+
+
+ shutdown + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Administratively shut down neighbor
+
+
+ solo + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Do not send back prefixes learned from the neighbor
+
+
+ strict_capability_match + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Enable strict capability negotiation
+
+
+ timers + +
+ dictionary +
+
+ +
Neighbor timers
+
+
+ connect + +
+ integer +
+
+ +
BGP connect timer for this neighbor.
+
+
+ holdtime + +
+ integer +
+
+ +
BGP hold timer for this neighbor
+
+
+ keepalive + +
+ integer +
+
+ +
BGP keepalive interval for this neighbor
+
+
+ ttl_security + +
+ integer +
+
+ +
Number of the maximum number of hops to the BGP peer
+
+
+ update_source + +
+ string +
+
+ +
Source IP of routing updates
+
+
+ timers + +
+ dictionary +
+
+ +
BGP protocol timers
+
+
+ holdtime + +
+ integer +
+
+ +
Hold time interval
+
+
+ keepalive + +
+ integer +
+
+ +
Keepalive interval
+
+
+ ospf + +
+ dictionary +
+
+ +
OSPFv2 configuration
+
+
+ areas + +
+ list + / elements=dictionary +
+
+ +
OSPFv2 area.
+
+
+ area_id + +
+ string +
+
+ +
OSPFv2 area identity.
+
+
+ area_type + +
+ dictionary +
+
+ +
Area type.
+
+
+ normal + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Normal OSPFv2 area.
+
+
+ nssa + +
+ dictionary +
+
+ +
NSSA OSPFv2 area.
+
+
+ default_cost + +
+ integer +
+
+ +
Summary-default cost of NSSA area.
+
+
+ no_summary + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Do not inject inter-area routes into stub.
+
+
+ set + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Enabling NSSA.
+
+
+ translate + +
+ string +
+
+
    Choices: +
  • always
  • +
  • candidate
  • +
  • never
  • +
+
+
NSSA-ABR.
+
+
+ stub + +
+ dictionary +
+
+ +
Stub OSPFv2 area.
+
+
+ default_cost + +
+ integer +
+
+ +
Summary-default cost of stub area.
+
+
+ no_summary + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Do not inject inter-area routes into stub.
+
+
+ set + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Enabling stub.
+
+
+ authentication + +
+ string +
+
+
    Choices: +
  • plaintext-password
  • +
  • md5
  • +
+
+
OSPFv2 area authentication type.
+
+
+ network + +
+ list + / elements=dictionary +
+
+ +
OSPFv2 network.
+
+
+ address + +
+ string + / required +
+
+ +
OSPFv2 IPv4 network address.
+
+
+ range + +
+ list + / elements=dictionary +
+
+ +
Summarize routes matching prefix (border routers only).
+
+
+ address + +
+ string +
+
+ +
border router IPv4 address.
+
+
+ cost + +
+ integer +
+
+ +
Metric for this range.
+
+
+ not_advertise + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Don't advertise this range.
+
+
+ substitute + +
+ string +
+
+ +
Announce area range (IPv4 address) as another prefix.
+
+
+ shortcut + +
+ string +
+
+
    Choices: +
  • default
  • +
  • disable
  • +
  • enable
  • +
+
+
Area's shortcut mode.
+
+
+ virtual_link + +
+ list + / elements=dictionary +
+
+ +
Virtual link address.
+
+
+ address + +
+ string +
+
+ +
virtual link address.
+
+
+ authentication + +
+ dictionary +
+
+ +
OSPFv2 area authentication type.
+
+
+ md5 + +
+ list + / elements=dictionary +
+
+ +
MD5 key id based authentication.
+
+
+ key_id + +
+ integer +
+
+ +
MD5 key id.
+
+
+ md5_key + +
+ string +
+
+ +
MD5 key.
+
+
+ plaintext_password + +
+ string +
+
+ +
Plain text password.
+
+
+ dead_interval + +
+ integer +
+
+ +
Interval after which a neighbor is declared dead.
+
+
+ hello_interval + +
+ integer +
+
+ +
Interval between hello packets.
+
+
+ retransmit_interval + +
+ integer +
+
+ +
Interval between retransmitting lost link state advertisements.
+
+
+ transmit_delay + +
+ integer +
+
+ +
Link state transmit delay.
+
+
+ auto_cost + +
+ dictionary +
+
+ +
Calculate OSPFv2 interface cost according to bandwidth.
+
+
+ reference_bandwidth + +
+ integer +
+
+ +
Reference bandwidth cost in Mbits/sec.
+
+
+ default_information + +
+ dictionary +
+
+ +
Control distribution of default information.
+
+
+ originate + +
+ dictionary +
+
+ +
Distribute a default route.
+
+
+ always + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Always advertise default route.
+
+
+ metric + +
+ integer +
+
+ +
OSPFv2 default metric.
+
+
+ metric_type + +
+ integer +
+
+ +
OSPFv2 Metric types for default routes.
+
+
+ route_map + +
+ string +
+
+ +
Route map references.
+
+
+ default_metric + +
+ integer +
+
+ +
Metric of redistributed routes
+
+
+ distance + +
+ dictionary +
+
+ +
Administrative distance.
+
+
+ global + +
+ integer +
+
+ +
Global OSPFv2 administrative distance.
+
+
+ ospf + +
+ dictionary +
+
+ +
OSPFv2 administrative distance.
+
+
+ external + +
+ integer +
+
+ +
Distance for external routes.
+
+
+ inter_area + +
+ integer +
+
+ +
Distance for inter-area routes.
+
+
+ intra_area + +
+ integer +
+
+ +
Distance for intra-area routes.
+
+
+ log_adjacency_changes + +
+ string +
+
+
    Choices: +
  • detail
  • +
+
+
Log changes in adjacency state.
+
+
+ max_metric + +
+ dictionary +
+
+ +
OSPFv2 maximum/infinite-distance metric.
+
+
+ router_lsa + +
+ dictionary +
+
+ +
Advertise own Router-LSA with infinite distance (stub router).
+
+
+ administrative + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Administratively apply, for an indefinite period.
+
+
+ on_shutdown + +
+ integer +
+
+ +
Time to advertise self as stub-router.
+
+
+ on_startup + +
+ integer +
+
+ +
Time to advertise self as stub-router
+
+
+ mpls_te + +
+ dictionary +
+
+ +
MultiProtocol Label Switching-Traffic Engineering (MPLS-TE) parameters.
+
+
+ enabled + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Enable MPLS-TE functionality.
+
+
+ router_address + +
+ string +
+
+ +
Stable IP address of the advertising router.
+
+
+ neighbor + +
+ list + / elements=dictionary +
+
+ +
Neighbor IP address.
+
+
+ neighbor_id + +
+ string +
+
+ +
Identity (number/IP address) of neighbor.
+
+
+ poll_interval + +
+ integer +
+
+ +
Seconds between dead neighbor polling interval.
+
+
+ priority + +
+ integer +
+
+ +
Neighbor priority.
+
+
+ parameters + +
+ dictionary +
+
+ +
OSPFv2 specific parameters.
+
+
+ abr_type + +
+ string +
+
+
    Choices: +
  • cisco
  • +
  • ibm
  • +
  • shortcut
  • +
  • standard
  • +
+
+
OSPFv2 ABR Type.
+
+
+ opaque_lsa + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Enable the Opaque-LSA capability (rfc2370).
+
+
+ rfc1583_compatibility + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Enable rfc1583 criteria for handling AS external routes.
+
+
+ router_id + +
+ string +
+
+ +
Override the default router identifier.
+
+
+ passive_interface + +
+ list + / elements=string +
+
+ +
Suppress routing updates on an interface.
+
+
+ passive_interface_exclude + +
+ list + / elements=string +
+
+ +
Interface to exclude when using passive-interface default.
+
+
+ redistribute + +
+ list + / elements=dictionary +
+
+ +
Redistribute information from another routing protocol.
+
+
+ metric + +
+ integer +
+
+ +
Metric for redistribution routes.
+
+
+ metric_type + +
+ integer +
+
+ +
OSPFv2 Metric types.
+
+
+ route_map + +
+ string +
+
+ +
Route map references.
+
+
+ route_type + +
+ string +
+
+
    Choices: +
  • bgp
  • +
  • connected
  • +
  • kernel
  • +
  • rip
  • +
  • static
  • +
+
+
Route type to redistribute.
+
+
+ route_map + +
+ list + / elements=string +
+
+ +
Filter routes installed in local route map.
+
+
+ timers + +
+ dictionary +
+
+ +
Adjust routing timers.
+
+
+ refresh + +
+ dictionary +
+
+ +
Adjust refresh parameters.
+
+
+ timers + +
+ integer +
+
+ +
refresh timer.
+
+
+ throttle + +
+ dictionary +
+
+ +
Throttling adaptive timers.
+
+
+ spf + +
+ dictionary +
+
+ +
OSPFv2 SPF timers.
+
+
+ delay + +
+ integer +
+
+ +
Delay (msec) from first change received till SPF calculation.
+
+
+ initial_holdtime + +
+ integer +
+
+ +
Initial hold time(msec) between consecutive SPF calculations.
+
+
+ max_holdtime + +
+ integer +
+
+ +
maximum hold time (sec).
+
+
+ ospfv3 + +
+ dictionary +
+
+ +
OSPFv3 configuration
+
+
+ areas + +
+ list + / elements=dictionary +
+
+ +
OSPFv3 area.
+
+
+ area_id + +
+ string +
+
+ +
OSPFv3 Area name/identity.
+
+
+ export_list + +
+ string +
+
+ +
Name of export-list.
+
+
+ import_list + +
+ string +
+
+ +
Name of import-list.
+
+
+ interface + +
+ list + / elements=dictionary +
+
+ +
Enable OSPVv3 on an interface for this area.
+

aliases: interfaces
+
+
+ name + +
+ string +
+
+ +
Interface name.
+
+
+ range + +
+ list + / elements=dictionary +
+
+ +
Summarize routes matching prefix (border routers only).
+
+
+ address + +
+ string +
+
+ +
border router IPv4 address.
+
+
+ advertise + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Advertise this range.
+
+
+ not_advertise + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Don't advertise this range.
+
+
+ parameters + +
+ dictionary +
+
+ +
OSPFv3 specific parameters.
+
+
+ router_id + +
+ string +
+
+ +
Override the default router identifier.
+
+
+ redistribute + +
+ list + / elements=dictionary +
+
+ +
Redistribute information from another routing protocol.
+
+
+ route_map + +
+ string +
+
+ +
Route map references.
+
+
+ route_type + +
+ string +
+
+
    Choices: +
  • bgp
  • +
  • connected
  • +
  • kernel
  • +
  • ripng
  • +
  • static
  • +
+
+
Route type to redistribute.
+
+
+ static + +
+ list + / elements=dictionary +
+
+ +
Static routes configuration
+
+
+ address_families + +
+ list + / elements=dictionary +
+
+ +
A dictionary specifying the address family to which the static route(s) belong.
+
+
+ afi + +
+ string + / required +
+
+
    Choices: +
  • ipv4
  • +
  • ipv6
  • +
+
+
Specifies the type of route.
+
+
+ routes + +
+ list + / elements=dictionary +
+
+ +
A dictionary that specify the static route configurations.
+
+
+ blackhole_config + +
+ dictionary +
+
+ +
Configured to silently discard packets.
+
+
+ distance + +
+ integer +
+
+ +
Distance for the route.
+
+
+ type + +
+ string +
+
+ +
This is to configure only blackhole.
+
+
+ dest + +
+ string + / required +
+
+ +
An IPv4/v6 address in CIDR notation that specifies the destination network for the static route.
+
+
+ next_hops + +
+ list + / elements=dictionary +
+
+ +
Next hops to the specified destination.
+
+
+ admin_distance + +
+ integer +
+
+ +
Distance value for the route.
+
+
+ enabled + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Disable IPv4/v6 next-hop static route.
+
+
+ forward_router_address + +
+ string +
+
+ +
The IP address of the next hop that can be used to reach the destination network.
+
+
+ interface + +
+ string +
+
+ +
Name of the outgoing interface.
+
+
+ table_id + +
+ integer +
+
+ +
Routing table associated with this instance
+
+
+ vni + +
+ integer +
+
+ +
Virtual Network Identifier
+
+
+ running_config + +
+ string +
+
+ +
This option is used only with state parsed.
+
The value of this option should be the output received from the VYOS device by executing the command show configuration commands | match "set vrf".
+
The states replaced and overridden have identical behaviour for this module.
+
The state parsed reads the configuration from show configuration commands | match "set vrf" option and transforms it into Ansible structured data as per the resource module's argspec and the value is then returned in the parsed key within the result.
+
+
+ state + +
+ string +
+
+
    Choices: +
  • deleted
  • +
  • merged ←
  • +
  • overridden
  • +
  • replaced
  • +
  • gathered
  • +
  • rendered
  • +
  • parsed
  • +
+
+
The state the configuration should be left in.
+
+
+ + +Notes +----- + +.. note:: + - Tested against vyos 1.4.2 and 1.5-stream-2025-Q1 + - This module works with connection ``network_cli``. + + + +Examples +-------- + +.. code-block:: yaml + + # # ------------------- + # # 1. Using merged + # # ------------------- + + # # Before state: + # # ------------- + # vyos@vyos:~$ show configuration commands | match 'set vrf' + # set vrf name vrf-blue description 'blue-vrf' + # set vrf name vrf-blue disable + # set vrf name vrf-blue table '100' + # set vrf name vrf-blue vni '1000' + # vyos@vyos:~$ + + # # Task + # # ------------- + # - name: Merge provided configuration with device configuration + # vyos.vyos.vyos_vrf: + # config: + # instances: + # - name: "vrf-green" + # description: "green-vrf" + # table_id: 110 + # vni: 1010 + + # Task output: + # ------------- + # "after": { + # "bind_to_all": false, + # "instances": [ + # { + # "description": "blue-vrf", + # "disable": true, + # "name": "vrf-blue", + # "table_id": 100, + # "vni": 1000 + # }, + # { + # "description": "green-vrf", + # "disable": false, + # "name": "vrf-green", + # "table_id": 110, + # "vni": 1010 + # } + # ] + # }, + # "before": { + # "bind_to_all": false, + # "instances": [ + # { + # "description": "blue-vrf", + # "disable": true, + # "name": "vrf-blue", + # "table_id": 100, + # "vni": 1000 + # } + # ] + # }, + # "changed": true, + # "commands": [ + # "set vrf name vrf-green table 110", + # "set vrf name vrf-green vni 1010", + # "set vrf name vrf-green description green-vrf" + # ] + + # After state: + # # ------------- + # vyos@vyos:~$ show configuration commands | match 'set vrf' + # set vrf name vrf-blue description 'blue-vrf' + # set vrf name vrf-blue disable + # set vrf name vrf-blue table '100' + # set vrf name vrf-blue vni '1000' + # set vrf name vrf-green description 'green-vrf' + # set vrf name vrf-green table '110' + # set vrf name vrf-green vni '1010' + # vyos@vyos:~$ + + # # ------------------- + # # 2. Using replaced + # # ------------------- + + # # Before state: + # # ------------- + # vyos@vyos:~$ show configuration commands | match 'set vrf' + # set vrf bind-to-all + # set vrf name vrf-blue description 'blue-vrf' + # set vrf name vrf-blue table '100' + # set vrf name vrf-blue vni '1000' + # set vrf name vrf-red description 'red-vrf' + # set vrf name vrf-red disable + # set vrf name vrf-red ip disable-forwarding + # set vrf name vrf-red ip protocol rip route-map 'rm1' + # set vrf name vrf-red table '101' + # set vrf name vrf-red vni '1001' + # vyos@vyos:~$ + + + # # Task + # # ------------- + # - name: Merge provided configuration with device configuration + # vyos.vyos.vyos_vrf: + # config: + # bind_to_all: true + # instances: + # - name: "vrf-blue" + # description: "blue-vrf" + # disable: false + # table_id: 100 + # vni: 1002 + # - name: "vrf-red" + # description: "red-vrf" + # disable: false + # table_id: 101 + # vni: 1001 + # address_family: + # - afi: "ipv4" + # disable_forwarding: false + # route_maps: + # - rm_name: "rm1" + # protocol: "ospf" + # - afi: "ipv6" + # nht_no_resolve_via_default: true + # state: replaced + + # # Task output: + # # ------------- + # "after": { + # "bind_to_all": true, + # "instances": [ + # { + # "description": "blue-vrf", + # "disable": false, + # "name": "vrf-blue", + # "table_id": 100, + # "vni": 1002 + # }, + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "disable_forwarding": false, + # "nht_no_resolve_via_default": false, + # "route_maps": [ + # { + # "protocol": "ospf", + # "rm_name": "rm1" + # }, + # { + # "protocol": "rip", + # "rm_name": "rm1" + # } + # ] + # }, + # { + # "afi": "ipv6", + # "disable_forwarding": false, + # "nht_no_resolve_via_default": true + # } + # ], + # "description": "red-vrf", + # "disable": false, + # "name": "vrf-red", + # "table_id": 101, + # "vni": 1001 + # } + # ] + # }, + # "before": { + # "bind_to_all": true, + # "instances": [ + # { + # "description": "blue-vrf", + # "disable": false, + # "name": "vrf-blue", + # "table_id": 100, + # "vni": 1000 + # }, + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "disable_forwarding": true, + # "nht_no_resolve_via_default": false, + # "route_maps": [ + # { + # "protocol": "rip", + # "rm_name": "rm1" + # } + # ] + # } + # ], + # "description": "red-vrf", + # "disable": true, + # "name": "vrf-red", + # "table_id": 101, + # "vni": 1001 + # } + # ] + # }, + # "changed": true, + # "commands": [ + # "set vrf name vrf-blue vni 1002", + # "delete vrf name vrf-red disable", + # "set vrf name vrf-red ip protocol ospf route-map rm1", + # "delete vrf name vrf-red ip disable-forwarding", + # "set vrf name vrf-red ipv6 nht no-resolve-via-default" + # ] + + # After state: + # # ------------- + # vyos@vyos:~$ + # set vrf bind-to-all + # set vrf name vrf-blue description 'blue-vrf' + # set vrf name vrf-blue table '100' + # set vrf name vrf-blue vni '1002' + # set vrf name vrf-red description 'red-vrf' + # set vrf name vrf-red ip protocol ospf route-map 'rm1' + # set vrf name vrf-red ip protocol rip route-map 'rm1' + # set vrf name vrf-red ipv6 nht no-resolve-via-default + # set vrf name vrf-red table '101' + # set vrf name vrf-red vni '1001' + # vyos@vyos:~$ + + + # # ------------------- + # # 3. Using overridden + # # ------------------- + + # # Before state: + # # ------------- + # vyos@vyos:~$ show configuration commands | match 'set vrf' + # set vrf bind-to-all + # set vrf name vrf-blue description 'blue-vrf' + # set vrf name vrf-blue table '100' + # set vrf name vrf-blue vni '1000' + # set vrf name vrf-red description 'red-vrf' + # set vrf name vrf-red disable + # set vrf name vrf-red ip disable-forwarding + # set vrf name vrf-red ip protocol rip route-map 'rm1' + # set vrf name vrf-red table '101' + # set vrf name vrf-red vni '1001' + # vyos@vyos:~$ + + # Task + # ------------- + # - name: Overridden provided configuration with device configuration + # vyos.vyos.vyos_vrf: + # config: + # bind_to_all: true + # instances: + # - name: "vrf-blue" + # description: "blue-vrf" + # disable: true + # table_id: 100 + # vni: 1000 + # - name: "vrf-red" + # description: "red-vrf" + # disable: true + # table_id: 101 + # vni: 1001 + # address_family: + # - afi: "ipv4" + # disable_forwarding: false + # route_maps: + # - rm_name: "rm1" + # protocol: "rip" + # - afi: "ipv6" + # nht_no_resolve_via_default: false + # state: overridden + + # # Task output: + # # ------------- + # "after": { + # "bind_to_all": true, + # "instances": [ + # { + # "description": "blue-vrf", + # "disable": true, + # "name": "vrf-blue", + # "table_id": 100, + # "vni": 1000 + # }, + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "disable_forwarding": false, + # "nht_no_resolve_via_default": false, + # "route_maps": [ + # { + # "protocol": "rip", + # "rm_name": "rm1" + # } + # ] + # } + # ], + # "description": "red-vrf", + # "disable": true, + # "name": "vrf-red", + # "table_id": 101, + # "vni": 1001 + # } + # ] + # }, + # "before": { + # "bind_to_all": true, + # "instances": [ + # { + # "description": "blue-vrf", + # "disable": false, + # "name": "vrf-blue", + # "table_id": 100, + # "vni": 1000 + # }, + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "disable_forwarding": true, + # "nht_no_resolve_via_default": false, + # "route_maps": [ + # { + # "protocol": "rip", + # "rm_name": "rm1" + # } + # ] + # } + # ], + # "description": "red-vrf", + # "disable": true, + # "name": "vrf-red", + # "table_id": 101, + # "vni": 1001 + # } + # ] + # }, + # "changed": true, + # "commands": [ + # "delete vrf name vrf-blue", + # "commit", + # "delete vrf name vrf-red", + # "commit", + # "set vrf name vrf-blue table 100", + # "set vrf name vrf-blue vni 1000", + # "set vrf name vrf-blue description blue-vrf", + # "set vrf name vrf-blue disable", + # "set vrf name vrf-red table 101", + # "set vrf name vrf-red vni 1001", + # "set vrf name vrf-red description red-vrf", + # "set vrf name vrf-red disable", + # "set vrf name vrf-red ip protocol rip route-map rm1" + # ] + + # After state: + # # ------------- + # vyos@vyos:~$ show configuration commands | match 'set vrf' + # set vrf bind-to-all + # set vrf name vrf-blue description 'blue-vrf' + # set vrf name vrf-blue disable + # set vrf name vrf-blue table '100' + # set vrf name vrf-blue vni '1000' + # set vrf name vrf-red description 'red-vrf' + # set vrf name vrf-red disable + # set vrf name vrf-red ip protocol rip route-map 'rm1' + # set vrf name vrf-red table '101' + # set vrf name vrf-red vni '1001' + # vyos@vyos:~$ + + # 4. Using gathered + # ------------------- + + # # Before state: + # # ------------- + # vyos@vyos:~$ show configuration commands | match 'set vrf' + # set vrf bind-to-all + # set vrf name vrf-blue description 'blue-vrf' + # set vrf name vrf-blue table '100' + # set vrf name vrf-blue vni '1000' + # set vrf name vrf-red description 'red-vrf' + # set vrf name vrf-red disable + # set vrf name vrf-red ip disable-forwarding + # set vrf name vrf-red ip protocol rip route-map 'rm1' + # set vrf name vrf-red table '101' + # set vrf name vrf-red vni '1001' + # vyos@vyos:~$ + + # Task + # ------------- + # - name: Gather provided configuration with device configuration + # vyos.vyos.vyos_vrf: + # config: + # state: gathered + + # # Task output: + # # ------------- + # "gathered": { + # "bind_to_all": true, + # "instances": [ + # { + # "description": "blue-vrf", + # "disable": false, + # "name": "vrf-blue", + # "table_id": 100, + # "vni": 1000 + # }, + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "disable_forwarding": true, + # "nht_no_resolve_via_default": false, + # "route_maps": [ + # { + # "protocol": "rip", + # "rm_name": "rm1" + # } + # ] + # } + # ], + # "description": "red-vrf", + # "disable": true, + # "name": "vrf-red", + # "table_id": 101, + # "vni": 1001 + # } + # ] + # } + + # After state: + # # ------------- + # vyos@vyos:~$ show configuration commands | match 'set vrf' + # set vrf bind-to-all + # set vrf name vrf-blue description 'blue-vrf' + # set vrf name vrf-blue table '100' + # set vrf name vrf-blue vni '1000' + # set vrf name vrf-red description 'red-vrf' + # set vrf name vrf-red disable + # set vrf name vrf-red ip disable-forwarding + # set vrf name vrf-red ip protocol rip route-map 'rm1' + # set vrf name vrf-red table '101' + # set vrf name vrf-red vni '1001' + # vyos@vyos:~$ + + + # # ------------------- + # # 5. Using deleted + # # ------------------- + + # # Before state: + # # ------------- + # vyos@vyos:~$ show configuration commands | match 'set vrf' + # set vrf bind-to-all + # set vrf name vrf-blue description 'blue-vrf' + # set vrf name vrf-blue table '100' + # set vrf name vrf-blue vni '1000' + # set vrf name vrf-red description 'red-vrf' + # set vrf name vrf-red disable + # set vrf name vrf-red ip disable-forwarding + # set vrf name vrf-red ip protocol rip route-map 'rm1' + # set vrf name vrf-red table '101' + # set vrf name vrf-red vni '1001' + # vyos@vyos:~$ + + # # Task + # # ------------- + # - name: Replace provided configuration with device configuration + # vyos.vyos.vyos_vrf: + # config: + # bind_to_all: false + # instances: + # - name: "vrf-blue" + # state: deleted + + + # # Task output: + # # ------------- + # "after": { + # "bind_to_all": false, + # "instances": [ + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "disable_forwarding": true, + # "nht_no_resolve_via_default": false, + # "route_maps": [ + # { + # "protocol": "rip", + # "rm_name": "rm1" + # } + # ] + # } + # ], + # "description": "red-vrf", + # "disable": true, + # "name": "vrf-red", + # "table_id": 101, + # "vni": 1001 + # } + # ] + # }, + # "before": { + # "bind_to_all": true, + # "instances": [ + # { + # "description": "blue-vrf", + # "disable": false, + # "name": "vrf-blue", + # "table_id": 100, + # "vni": 1000 + # }, + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "disable_forwarding": true, + # "nht_no_resolve_via_default": false, + # "route_maps": [ + # { + # "protocol": "rip", + # "rm_name": "rm1" + # } + # ] + # } + # ], + # "description": "red-vrf", + # "disable": true, + # "name": "vrf-red", + # "table_id": 101, + # "vni": 1001 + # } + # ] + # }, + # "changed": true, + # "commands": [ + # "delete vrf bind-to-all", + # "delete vrf name vrf-blue" + # ] + + # After state: + # # ------------- + # vyos@vyos:~$ show configuration commands | match 'set vrf' + # set vrf name vrf-red description 'red-vrf' + # set vrf name vrf-red disable + # set vrf name vrf-red ip disable-forwarding + # set vrf name vrf-red ip protocol rip route-map 'rm1' + # set vrf name vrf-red table '101' + # set vrf name vrf-red vni '1001' + # vyos@vyos:~$ + + # # ------------------- + # # 6. Using rendered + # # ------------------- + + # # Before state: + # # ------------- + # vyos@vyos:~$ show configuration commands | match 'set vrf' + # set vrf name vrf-red description 'red-vrf' + # set vrf name vrf-red disable + # set vrf name vrf-red ip disable-forwarding + # set vrf name vrf-red ip protocol rip route-map 'rm1' + # set vrf name vrf-red table '101' + # set vrf name vrf-red vni '1001' + # vyos@vyos:~$ + + # Task + # ------------- + # - name: Render provided configuration with device configuration + # vyos.vyos.vyos_vrf: + # config: + # bind_to_all: true + # instances: + # - name: "vrf-green" + # description: "green-vrf" + # disabled: true + # table_id: 105 + # vni: 1000 + # - name: "vrf-amber" + # description: "amber-vrf" + # disable: false + # table_id: 111 + # vni: 1001 + # address_family: + # - afi: "ipv4" + # disable_forwarding: true + # route_maps: + # - rm_name: "rm1" + # protocol: "ospf" + # - afi: "ipv6" + # nht_no_resolve_via_default: false + # state: rendered + + # # Task output: + # # ------------- + # "rendered": [ + # "set vrf bind-to-all", + # "set vrf name vrf-green table 105", + # "set vrf name vrf-green vni 1000", + # "set vrf name vrf-green description green-vrf", + # "set vrf name vrf-green disable", + # "set vrf name vrf-amber table 111", + # "set vrf name vrf-amber vni 1001", + # "set vrf name vrf-amber description amber-vrf", + # "set vrf name vrf-amber ip protocol ospf route-map rm1", + # "set vrf name vrf-amber ip disable-forwarding" + # ] + + # # ------------------- + # # 7. Using parsed + # # ------------------- + + # # vrf_parsed.cfg: + # # ------------- + # set vrf bind-to-all + # set vrf name vrf1 description 'red' + # set vrf name vrf1 disable + # set vrf name vrf1 table 101 + # set vrf name vrf1 vni 501 + # set vrf name vrf2 description 'blah2' + # set vrf name vrf2 disable + # set vrf name vrf2 table 102 + # set vrf name vrf2 vni 102 + # set vrf name vrf1 ip disable-forwarding + # set vrf name vrf1 ip nht no-resolve-via-default + # set vrf name vrf-red ip protocol ospf route-map 'rm1' + # set vrf name vrf-red ipv6 nht no-resolve-via-default + + # Task: + # ------------- + # - name: Parse provided configuration with device configuration + # vyos.vyos.vyos_vrf: + # running_config: "{{ lookup('file', './vrf_parsed.cfg') }}" + # state: parsed + + + # # Task output: + # # ------------- + # "parsed": { + # "bind_to_all": true, + # "instances": [ + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "disable_forwarding": true, + # "nht_no_resolve_via_default": true + # } + # ], + # "description": "red", + # "disable": true, + # "name": "vrf1" + # }, + # { + # "description": "blah2", + # "disable": true, + # "name": "vrf2" + # }, + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "disable_forwarding": false, + # "nht_no_resolve_via_default": false, + # "route_maps": [ + # { + # "protocol": "ospf", + # "rm_name": "rm1" + # } + # ] + # }, + # { + # "afi": "ipv6", + # "disable_forwarding": false, + # "nht_no_resolve_via_default": true + # } + # ], + # "disable": false, + # "name": "vrf-red" + # } + # ] + # } + + + +Return Values +------------- +Common return values are documented `here `_, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ after + +
+ dictionary +
+
when changed +
The resulting configuration after module execution.
+
+
Sample:
+
This output will always be in the same format as the module argspec.
+
+
+ before + +
+ dictionary +
+
when state is merged, replaced, overridden, deleted or purged +
The configuration prior to the module execution.
+
+
Sample:
+
This output will always be in the same format as the module argspec.
+
+
+ commands + +
+ list +
+
when state is merged, replaced, overridden, deleted or purged +
The set of commands pushed to the remote device.
+
+
Sample:
+
['set system ntp server server1 dynamic', 'set system ntp server server1 prefer', 'set system ntp server server2 noselect', 'set system ntp server server2 preempt', 'set system ntp server server_add preempt']
+
+
+ gathered + +
+ list +
+
when state is gathered +
Facts about the network resource gathered from the remote device as structured data.
+
+
Sample:
+
This output will always be in the same format as the module argspec.
+
+
+ parsed + +
+ list +
+
when state is parsed +
The device native config provided in running_config option parsed into structured data as per module argspec.
+
+
Sample:
+
This output will always be in the same format as the module argspec.
+
+
+ rendered + +
+ list +
+
when state is rendered +
The provided configuration in the task rendered in device-native format (offline).
+
+
Sample:
+
['set system ntp server server1 dynamic', 'set system ntp server server1 prefer', 'set system ntp server server2 noselect', 'set system ntp server server2 preempt', 'set system ntp server server_add preempt']
+
+

+ + +Status +------ + + +Authors +~~~~~~~ + +- Evgeny Molotkov (@omnom62) -- cgit v1.2.3