community.general.icx_static_route (0.1.1) — module

Manage static IP routes on Ruckus ICX 7000 series switches

Authors: Ruckus Wireless (@Commscope)

preview | supported by community

Install collection

Install with ansible-galaxy collection install community.general:==0.1.1


Add to requirements.yml

  collections:
    - name: community.general
      version: 0.1.1

Description

This module provides declarative management of static IP routes on Ruckus ICX network devices.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: configure static route
  icx_static_route:
    prefix: 192.168.2.0/24
    next_hop: 10.0.0.1
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: remove configuration
  icx_static_route:
    prefix: 192.168.2.0
    mask: 255.255.255.0
    next_hop: 10.0.0.1
    state: absent
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Add static route aggregates
  icx_static_route:
    aggregate:
      - { prefix: 172.16.32.0, mask: 255.255.255.0, next_hop: 10.0.0.8 }
      - { prefix: 172.16.33.0, mask: 255.255.255.0, next_hop: 10.0.0.8 }
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: remove static route aggregates
  icx_static_route:
    aggregate:
      - { prefix: 172.16.32.0, mask: 255.255.255.0, next_hop: 10.0.0.8 }
      - { prefix: 172.16.33.0, mask: 255.255.255.0, next_hop: 10.0.0.8 }
    state: absent

Inputs

    
mask:
    description:
    - Network prefix mask of the static route.
    type: str

purge:
    default: false
    description:
    - Purge routes not defined in the I(aggregate) parameter.
    type: bool

state:
    choices:
    - present
    - absent
    default: present
    description:
    - State of the static route configuration.
    type: str

prefix:
    description:
    - Network prefix of the static route.
    type: str

next_hop:
    description:
    - Next hop IP of the static route.
    type: str

aggregate:
    description: List of static route definitions.
    suboptions:
      admin_distance:
        description:
        - Admin distance of the static route. Range is 1 to 255.
        type: int
      check_running_config:
        description:
        - Check running configuration. This can be set as environment variable. Module
          will use environment variable value(default:True), unless it is overridden,
          by specifying it as module parameter.
        type: bool
      mask:
        description:
        - Network prefix mask of the static route.
        type: str
      next_hop:
        description:
        - Next hop IP of the static route.
        type: str
      prefix:
        description:
        - Network prefix of the static route.
        type: str
      state:
        choices:
        - present
        - absent
        description:
        - State of the static route configuration.
        type: str
    type: list

admin_distance:
    description:
    - Admin distance of the static route. Range is 1 to 255.
    type: int

check_running_config:
    default: true
    description:
    - Check running configuration. This can be set as environment variable. Module will
      use environment variable value(default:True), unless it is overridden, by specifying
      it as module parameter.
    type: bool

Outputs

commands:
  description: The list of configuration mode commands to send to the device
  returned: always
  sample:
  - ip route 192.168.2.0 255.255.255.0 10.0.0.1
  type: list