W3cubDocs

/Ansible

community.network.icx_l3_interface – Manage Layer-3 interfaces on Ruckus ICX 7000 series switches

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.icx_l3_interface.

Synopsis

  • This module provides declarative management of Layer-3 interfaces on ICX network devices.

Parameters

Parameter Choices/Defaults Comments
aggregate
list / elements=string
List of Layer-3 interfaces definitions. Each of the entry in aggregate list should define name of interface name and a optional ipv4 or ipv6 address.
check_running_config
boolean
    Choices:
  • no
  • yes
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.
ipv4
string
IPv4 address to be set for the Layer-3 interface mentioned in name option. The address format is <ipv4 address>/<mask>, the mask is number in range 0-32 eg. 192.168.0.1/24
ipv6
string
IPv6 address to be set for the Layer-3 interface mentioned in name option. The address format is <ipv6 address>/<mask>, the mask is number in range 0-128 eg. fd5d:12c9:2201:1::1/64.
mode
string
    Choices:
  • dynamic
  • ospf-ignore
  • ospf-passive
Specifies if ipv4 address should be dynamic/advertise to ospf/not advertise to ospf. This should be specified only if ipv4 address is configured and if it is not secondary IP address.
name
string
Name of the Layer-3 interface to be configured eg. GigabitEthernet0/2, ve 10, ethernet 1/1/1
replace
string
    Choices:
  • yes
  • no
Replaces the configured primary IP address on the interface.
secondary
string
    Choices:
  • yes
  • no
Specifies that the configured address is a secondary IP address. If this keyword is omitted, the configured address is the primary IP address.
state
string
    Choices:
  • present
  • absent
State of the Layer-3 interface configuration. It indicates if the configuration should be present or absent on remote device.
check_running_config
boolean
    Choices:
  • no
  • yes
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.
ipv4
string
IPv4 address to be set for the Layer-3 interface mentioned in name option. The address format is <ipv4 address>/<mask>, the mask is number in range 0-32 eg. 192.168.0.1/24
ipv6
string
IPv6 address to be set for the Layer-3 interface mentioned in name option. The address format is <ipv6 address>/<mask>, the mask is number in range 0-128 eg. fd5d:12c9:2201:1::1/64.
mode
string
    Choices:
  • dynamic
  • ospf-ignore
  • ospf-passive
Specifies if ipv4 address should be dynamic/advertise to ospf/not advertise to ospf. This should be specified only if ipv4 address is configured and if it is not secondary IP address.
name
string
Name of the Layer-3 interface to be configured eg. GigabitEthernet0/2, ve 10, ethernet 1/1/1
replace
string
    Choices:
  • yes
  • no
Replaces the configured primary IP address on the interface.
secondary
string
    Choices:
  • yes
  • no
Specifies that the configured address is a secondary IP address. If this keyword is omitted, the configured address is the primary IP address.
state
string
    Choices:
  • present
  • absent
State of the Layer-3 interface configuration. It indicates if the configuration should be present or absent on remote device.

Notes

Note

Examples

- name: Remove ethernet 1/1/1 IPv4 and IPv6 address
  community.network.icx_l3_interface:
    name: ethernet 1/1/1
    ipv4: 192.168.0.1/24
    ipv6: "fd5d:12c9:2201:1::1/64"
    state: absent

- name: Replace ethernet 1/1/1 primary IPv4 address
  community.network.icx_l3_interface:
    name: ethernet 1/1/1
    ipv4: 192.168.0.1/24
    replace: yes
    state: absent

- name: Replace ethernet 1/1/1 dynamic IPv4 address
  community.network.icx_l3_interface:
    name: ethernet 1/1/1
    ipv4: 192.168.0.1/24
    mode: dynamic
    state: absent

- name: Set ethernet 1/1/1 secondary IPv4 address
  community.network.icx_l3_interface:
    name: ethernet 1/1/1
    ipv4: 192.168.0.1/24
    secondary: yes
    state: absent

- name: Set ethernet 1/1/1 IPv4 address
  community.network.icx_l3_interface:
    name: ethernet 1/1/1
    ipv4: 192.168.0.1/24

- name: Set ethernet 1/1/1 IPv6 address
  community.network.icx_l3_interface:
    name: ethernet 1/1/1
    ipv6: "fd5d:12c9:2201:1::1/64"

- name: Set IP addresses on aggregate
  community.network.icx_l3_interface:
    aggregate:
      - { name: GigabitEthernet0/3, ipv4: 192.168.2.10/24 }
      - { name: GigabitEthernet0/3, ipv4: 192.168.3.10/24, ipv6: "fd5d:12c9:2201:1::1/64" }

- name: Remove IP addresses on aggregate
  community.network.icx_l3_interface:
    aggregate:
      - { name: GigabitEthernet0/3, ipv4: 192.168.2.10/24 }
      - { name: GigabitEthernet0/3, ipv4: 192.168.3.10/24, ipv6: "fd5d:12c9:2201:1::1/64" }
    state: absent


- name: Set the ipv4 and ipv6 of a virtual ethernet(ve)
  community.network.icx_l3_interface:
    name: ve 100
    ipv4: 192.168.0.1
    ipv6: "2001:0db8:85a3:0000:0000:8a2e:0370:7334"

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, except for the platforms that use Netconf transport to manage the device.
The list of configuration mode commands to send to the device

Sample:
['interface ethernet 1/1/1', 'ip address 192.168.0.1 255.255.255.0', 'ipv6 address fd5d:12c9:2201:1::1/64']


Authors

  • Ruckus Wireless (@Commscope)

© 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/icx_l3_interface_module.html