community / community.general / 0.1.1 / module / cnos_static_route Manage static IP routes on Lenovo CNOS network devices Authors: Anil Kumar Muraleedharan (@amuraleedhar) preview | supported by communitycommunity.general.cnos_static_route (0.1.1) — module
Install with ansible-galaxy collection install community.general:==0.1.1
collections: - name: community.general version: 0.1.1
This module provides declarative management of static IP routes on Lenovo CNOS network devices.
- name: configure static route 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 cnos_static_route: prefix: 10.241.107.0 mask: 255.255.255.0 interface: Ethernet1/13 description: hello world tag: 100
- name: remove configuration 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 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 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
tag: description: - Set tag of the static route. mask: description: - Network prefix mask of the static route. state: choices: - present - absent default: present description: - State of the static route configuration. prefix: description: - Network prefix of the static route. next_hop: description: - Next hop IP of the static route. aggregate: description: List of static route definitions. interface: description: - Interface of the static route. description: aliases: - description description: - Name of the static route admin_distance: default: 1 description: - Admin distance of the static route.
commands: description: The list of configuration mode commands to send to the device returned: always sample: - ip route 10.241.107.0 255.255.255.0 10.241.106.0 type: list