community.network.icx_interface 模块 – 管理 Ruckus ICX 7000 系列交换机上的接口

注意

此模块是 community.network 集合(版本 5.1.0)的一部分。

如果您正在使用 ansible 包,则可能已经安装了此集合。它不包含在 ansible-core 中。要检查是否已安装,请运行 ansible-galaxy collection list

要安装它,请使用:ansible-galaxy collection install community.network

要在 playbook 中使用它,请指定:community.network.icx_interface

注意

community.network 集合已被弃用,并将从 Ansible 12 中删除。有关更多信息,请参阅讨论主题

已弃用

移除时间:

版本 6.0.0

原因:

此集合及其中的所有内容均未维护且已弃用。

替代方案:

未知。

概要

  • 此模块提供对 Ruckus ICX 设备上接口的声明式管理。

别名:network.icx.icx_interface

参数

参数

注释

aggregate

列表 / 元素=字典

接口定义的列表。

check_running_config

布尔值

检查正在运行的配置。 可以将其设置为环境变量。

除非将其指定为模块参数,否则模块将使用环境变量值(默认值:True)。

选择

  • false

  • true

delay

整数

在检查远程设备上的运行状态之前等待的时间(以秒为单位)。 此等待适用于运行状态参数,即值为 up / down 的 *state*,*tx_rate* 和 *rx_rate*。

description

字符串

描述的名称。

enabled

布尔值

接口链路状态

选择

  • false

  • true

name

字符串

接口的名称。

neighbors

列表 / 元素=字典

检查给定接口 name 的 CDP / LLDP 邻居的运行状态。

以下子选项可用。

host

字符串

给定接口 name 的 CDP/LLDP 邻居主机。

port

字符串

给定接口 name 连接到的 CDP/LLDP 邻居端口。

power

字典

以太网供电 (PoE) 端口上的在线电源。

by_class

字符串

范围为 0-4

给定接口 name 的基于类值的功率限制

选择

  • "0"

  • "1"

  • "2"

  • "3"

  • "4"

enabled

布尔值

启用/禁用给定接口 name 的 PoE

选择

  • false

  • true

limit

字符串

范围为 1000-15400|30000mW。 对于 PoH 端口,范围为 1000-95000mW

给定接口 name 的基于实际功率值的功率限制

priority

字符串

范围为 1(最高)到 3(最低)

给定接口 name 的电源管理优先级

选择

  • "1"

  • "2"

  • "3"

rx_rate

字符串

接收器速率,以每秒比特数 (bps) 为单位。

这只是状态检查参数。

支持条件,请参阅 网络模块中的条件

speed

字符串

接口链路速度/双工

选择

  • "10-full"

  • "10-half"

  • "100-full"

  • "100-half"

  • "1000-full"

  • "1000-full-master"

  • "1000-full-slave"

  • "10g-full"

  • "10g-full-master"

  • "10g-full-slave"

  • "2500-full"

  • "2500-full-master"

  • "2500-full-slave"

  • "5g-full"

  • "5g-full-master"

  • "5g-full-slave"

  • "auto"

state

字符串

接口配置的状态,up 表示存在且运行正常,down 表示存在且运行 down

选择

  • "present"

  • "absent"

  • "up"

  • "down"

stp

布尔值

启用/禁用接口的 stp

选择

  • false

  • true

tx_rate

字符串

传输速率,以每秒比特数 (bps) 为单位。

这只是状态检查参数。

支持条件,请参阅 网络模块中的条件

check_running_config

布尔值

检查正在运行的配置。 可以将其设置为环境变量。

除非将其指定为模块参数,否则模块将使用环境变量值(默认值:True)。

选择

  • false

  • true ← (默认)

delay

整数

在检查远程设备上的运行状态之前等待的时间(以秒为单位)。 此等待适用于运行状态参数,即值为 up / down 的 *state*,*tx_rate* 和 *rx_rate*。

默认值: 10

description

字符串

描述的名称。

enabled

布尔值

接口链路状态

选择

  • false

  • true ← (默认)

name

字符串

接口的名称。

neighbors

列表 / 元素=字典

检查给定接口 name 的 CDP / LLDP 邻居的运行状态。

以下子选项可用。

host

字符串

给定接口 name 的 CDP/LLDP 邻居主机。

port

字符串

给定接口 name 连接到的 CDP/LLDP 邻居端口。

power

字典

以太网供电 (PoE) 端口上的在线电源。

by_class

字符串

范围为 0-4

给定接口 name 的基于类值的功率限制

选择

  • "0"

  • "1"

  • "2"

  • "3"

  • "4"

enabled

布尔值

启用/禁用给定接口 name 的 PoE

默认值为 false。

选择

  • false

  • true

limit

字符串

范围为 1000-15400|30000mW。 对于 PoH 端口,范围为 1000-95000mW

给定接口 name 的基于实际功率值的功率限制

priority

字符串

范围为 1(最高)到 3(最低)

给定接口 name 的电源管理优先级

选择

  • "1"

  • "2"

  • "3"

rx_rate

字符串

接收器速率,以每秒比特数 (bps) 为单位。

这只是状态检查参数。

支持条件,请参阅 网络模块中的条件

speed

字符串

接口链路速度/双工

选择

  • "10-full"

  • "10-half"

  • "100-full"

  • "100-half"

  • "1000-full"

  • "1000-full-master"

  • "1000-full-slave"

  • "10g-full"

  • "10g-full-master"

  • "10g-full-slave"

  • "2500-full"

  • "2500-full-master"

  • "2500-full-slave"

  • "5g-full"

  • "5g-full-master"

  • "5g-full-slave"

  • "auto"

state

字符串

接口配置的状态,up 表示存在且运行正常,down 表示存在且运行 down

选择

  • "present" ← (默认)

  • "absent"

  • "up"

  • "down"

stp

布尔值

启用/禁用接口的 stp

选择

  • false

  • true

tx_rate

字符串

传输速率,以每秒比特数 (bps) 为单位。

这只是状态检查参数。

支持条件,请参阅 网络模块中的条件

注释

注意

示例

- name: Enable ethernet port and set name
  community.network.icx_interface:
    name: ethernet 1/1/1
    description: interface-1
    stp: true
    enabled: true

- name: Disable ethernet port 1/1/1
  community.network.icx_interface:
      name: ethernet 1/1/1
      enabled: false

- name: Enable ethernet port range, set name and speed
  community.network.icx_interface:
      name: ethernet 1/1/1 to 1/1/10
      description: interface-1
      speed: 100-full
      enabled: true

- name: Enable poe. Set class
  community.network.icx_interface:
      name: ethernet 1/1/1
      power:
       by_class: 2

- name: Configure poe limit of interface
  community.network.icx_interface:
      name: ethernet 1/1/1
      power:
       limit: 10000

- name: Disable poe of interface
  community.network.icx_interface:
      name: ethernet 1/1/1
      power:
       enabled: false

- name: Set lag name for a range of lags
  community.network.icx_interface:
      name: lag 1 to 10
      description: test lags

- name: Disable lag
  community.network.icx_interface:
      name: lag 1
      enabled: false

- name: Enable management interface
  community.network.icx_interface:
      name: management 1
      enabled: true

- name: Enable loopback interface
  community.network.icx_interface:
      name: loopback 10
      enabled: true

- name: Add interface using aggregate
  community.network.icx_interface:
      aggregate:
      - { name: ethernet 1/1/1, description: test-interface-1, power: { by_class: 2 } }
      - { name: ethernet 1/1/3, description: test-interface-3}
      speed: 10-full
      enabled: true

- name: Check tx_rate, rx_rate intent arguments
  community.network.icx_interface:
    name: ethernet 1/1/10
    state: up
    tx_rate: ge(0)
    rx_rate: le(0)

- name: Check neighbors intent arguments
  community.network.icx_interface:
    name: ethernet 1/1/10
    neighbors:
    - port: 1/1/5
      host: netdev

返回值

常见的返回值记录在这里,以下是此模块特有的字段

描述

commands

列表 / 元素=字符串

要发送到设备的配置模式命令列表。

返回: 总是

示例: ["interface ethernet 1/1/1", "port-name interface-1", "state present", "speed-duplex 100-full", "inline power priority 1"]

状态

  • 此模块将在 6.0.0 版本中移除。 [已弃用]

  • 更多信息请参阅已弃用

作者

  • Ruckus Wireless (@Commscope)