Note
This plugin is part of the community.network collection (version 3.0.0).
You might already have this collection installed if you are using the ansible
package. It is not included in ansible-core
. To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.network
.
To use it in a playbook, specify: community.network.cnos_static_route
.
Parameter | Choices/Defaults | Comments |
---|---|---|
admin_distance string | Default: 1 | Admin distance of the static route. |
aggregate string | List of static route definitions. | |
description string | Name of the static route aliases: description | |
interface string | Interface of the static route. | |
mask string | Network prefix mask of the static route. | |
next_hop string | Next hop IP of the static route. | |
prefix string | Network prefix of the static route. | |
state string |
| State of the static route configuration. |
tag string | Set tag of the static route. |
Note
- 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
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'] |
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/community/network/cnos_static_route_module.html