.. _cisco.nxos.nxos_static_routes_module:
*****************************
cisco.nxos.nxos_static_routes
*****************************
**Static routes resource module**
Version added: 1.0.0
.. contents::
:local:
:depth: 1
Synopsis
--------
- This module configures and manages the attributes of static routes on Cisco NX-OS platforms.
Parameters
----------
.. raw:: html
| Parameter |
Choices/Defaults |
Comments |
|
config
list
/ elements=dictionary
|
|
A list of configurations for static routes
|
|
address_families
list
/ elements=dictionary
|
|
A dictionary specifying the address family to which the static route(s) belong.
|
|
|
afi
string
/ required
|
|
Specifies the top level address family indicator.
|
|
|
routes
list
/ elements=dictionary
|
|
A dictionary that specifies the static route configurations
|
|
|
|
dest
string
/ required
|
|
Destination prefix of static route
The address format is <ipv4/v6 address>/<mask>
The mask is number in range 0-32 for IPv4 and in range 0-128 for IPv6
|
|
|
|
next_hops
list
/ elements=dictionary
|
|
Details of route to be taken
|
|
|
|
|
admin_distance
integer
|
|
Preference or administrative distance of route (range 1-255)
|
|
|
|
|
dest_vrf
string
|
|
VRF of the destination
|
|
|
|
|
forward_router_address
string
|
|
IP address of the next hop router
|
|
|
|
|
interface
string
|
|
Outgoing interface to take. For anything except 'Null0', then next hop IP address should also be configured.
|
|
|
|
|
route_name
string
|
|
Name of the static route
|
|
|
|
|
tag
integer
|
|
Route tag value (numeric)
|
|
|
|
|
track
integer
|
|
Track value (range 1 - 512). Track must already be configured on the device before adding the route.
|
|
vrf
string
|
|
The VRF to which the static route(s) belong
|
|
running_config
string
|
|
This option is used only with state parsed.
The value of this option should be the output received from the NX-OS device by executing the following commands in order show running-config | include '^ip(v6* route') and show running-config | section '^vrf context'.
The state parsed reads the configuration from 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 parsed key within the result.
|
|
state
string
|
Choices:
- deleted
merged ←
- overridden
- replaced
- gathered
- rendered
- parsed
|
The state the configuration should be left in
The states rendered, gathered and parsed does not perform any change on the device.
The state rendered will transform the configuration in config option to platform specific CLI commands which will be returned in the rendered key within the result. For state rendered active connection to remote host is not required.
The state deleted does not support or guarantee granular deletion of configuration the playbook should act as source of truth, and the desired state of the resouce is what the playbook should reflect. Use overridden or replaced to get extra configuration removed.
The state 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 gathered key within the result.
The state parsed reads the configuration from running_config option and transforms it into JSON format as per the resource module parameters and the value is returned in the parsed key within the result. The value of running_config option should be the same format as the output of command show running-config | section '^ip(v6* route') executed on device. For state parsed active connection to remote host is not required.
|