community.network.cnos_static_route – Manage static IP routes on Lenovo CNOS network devices¶
Note
This plugin is part of the community.network collection (version 1.3.2).
To install it use: ansible-galaxy collection install community.network
.
To use it in a playbook, specify: community.network.cnos_static_route
.
Synopsis¶
This module provides declarative management of static IP routes on Lenovo CNOS network devices.
Parameters¶
Examples¶
- name: Configure static route
community.network.cnos_static_route:
prefix: 10.241.107.0
mask: 255.255.255.0
next_hop: 10.241.106.1
- name: Configure ultimate route with name and tag
community.network.cnos_static_route:
prefix: 10.241.107.0
mask: 255.255.255.0
interface: Ethernet1/13
description: hello world
tag: 100
- name: Remove configuration
community.network.cnos_static_route:
prefix: 10.241.107.0
mask: 255.255.255.0
next_hop: 10.241.106.0
state: absent
- name: Add static route aggregates
community.network.cnos_static_route:
aggregate:
- { prefix: 10.241.107.0, mask: 255.255.255.0, next_hop: 10.241.105.0 }
- { prefix: 10.241.106.0, mask: 255.255.255.0, next_hop: 10.241.104.0 }
- name: Remove static route aggregates
community.network.cnos_static_route:
aggregate:
- { prefix: 10.241.107.0, mask: 255.255.255.0, next_hop: 10.241.105.0 }
- { prefix: 10.241.106.0, mask: 255.255.255.0, next_hop: 10.241.104.0 }
state: absent
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
commands
list
/ elements=string
|
always |
The list of configuration mode commands to send to the device
Sample:
['ip route 10.241.107.0 255.255.255.0 10.241.106.0']
|
Authors¶
Anil Kumar Muraleedharan (@amuraleedhar)