W3cubDocs

/Ansible 2.11

mellanox.onyx.onyx_interface – Manage Interfaces on Mellanox ONYX network devices

Note

This plugin is part of the mellanox.onyx collection (version 1.0.0).

To install it use: ansible-galaxy collection install mellanox.onyx.

To use it in a playbook, specify: mellanox.onyx.onyx_interface.

Synopsis

  • This module provides declarative management of Interfaces on Mellanox ONYX network devices.

Parameters

Parameter Choices/Defaults Comments
aggregate
string
List of Interfaces definitions.
delay
string
Default:
10
Time in seconds to wait before checking for the operational state on remote device. This wait is applicable for operational state argument which are state with values up/down.
description
string
Description of Interface.
duplex
string
    Choices:
  • full
  • half
  • auto
Interface link status
enabled
boolean
    Choices:
  • no
  • yes
Interface link status.
mtu
string
Maximum size of transmit packet.
name
string / required
Name of the Interface.
purge
boolean
    Choices:
  • no
  • yes
Purge Interfaces not defined in the aggregate parameter. This applies only for logical interface.
rx_rate
string
Receiver rate in bits per second (bps).
This is state check parameter only.
Supports conditionals, see Conditionals in Networking Modules
speed
string
    Choices:
  • 1G
  • 10G
  • 25G
  • 40G
  • 50G
  • 56G
  • 100G
Interface link speed.
state
string
    Choices:
  • present
  • absent
  • up
  • down
State of the Interface configuration, up means present and operationally up and down means present and operationally down
tx_rate
string
Transmit rate in bits per second (bps).
This is state check parameter only.
Supports conditionals, see Conditionals in Networking Modules

Examples

- name: Configure interface
  onyx_interface:
      name: Eth1/2
      description: test-interface
      speed: 100G
      mtu: 512

- name: Make interface up
  onyx_interface:
    name: Eth1/2
    enabled: True

- name: Make interface down
  onyx_interface:
    name: Eth1/2
    enabled: False

- name: Check intent arguments
  onyx_interface:
    name: Eth1/2
    state: up

- name: Config + intent
  onyx_interface:
    name: Eth1/2
    enabled: False
    state: down

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
The list of configuration mode commands to send to the device.

Sample:
['interface ethernet 1/2', 'description test-interface', 'mtu 512', 'exit']


Authors

  • Samer Deeb (@samerd)

© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.11/collections/mellanox/onyx/onyx_interface_module.html