community.general.onyx_interface (0.1.1) — module

Manage Interfaces on Mellanox ONYX network devices

Authors: Samer Deeb (@samerd)

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 Interfaces on Mellanox ONYX network devices.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: configure interface
  onyx_interface:
      name: Eth1/2
      description: test-interface
      speed: 100G
      mtu: 512
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: make interface up
  onyx_interface:
    name: Eth1/2
    enabled: True
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: make interface down
  onyx_interface:
    name: Eth1/2
    enabled: False
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Check intent arguments
  onyx_interface:
    name: Eth1/2
    state: up
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Config + intent
  onyx_interface:
    name: Eth1/2
    enabled: False
    state: down

Inputs

    
mtu:
    description:
    - Maximum size of transmit packet.

name:
    description:
    - Name of the Interface.
    required: true

delay:
    default: 10
    description:
    - Time in seconds to wait before checking for the operational state on remote device.
      This wait is applicable for operational state argument which are I(state) with values
      C(up)/C(down).

purge:
    default: false
    description:
    - Purge Interfaces not defined in the aggregate parameter. This applies only for logical
      interface.
    type: bool

speed:
    choices:
    - 1G
    - 10G
    - 25G
    - 40G
    - 50G
    - 56G
    - 100G
    description:
    - Interface link speed.

state:
    choices:
    - present
    - absent
    - up
    - down
    default: present
    description:
    - State of the Interface configuration, C(up) means present and operationally up and
      C(down) means present and operationally C(down)

duplex:
    choices:
    - full
    - half
    - auto
    default: auto
    description:
    - Interface link status

enabled:
    description:
    - Interface link status.
    type: bool

rx_rate:
    description:
    - Receiver rate in bits per second (bps).
    - This is state check parameter only.
    - Supports conditionals, see L(Conditionals in Networking Modules,../network/user_guide/network_working_with_command_output.html)

tx_rate:
    description:
    - Transmit rate in bits per second (bps).
    - This is state check parameter only.
    - Supports conditionals, see L(Conditionals in Networking Modules,../network/user_guide/network_working_with_command_output.html)

aggregate:
    description: List of Interfaces definitions.

description:
    description:
    - Description of Interface.

Outputs

commands:
  description: The list of configuration mode commands to send to the device.
  returned: always
  sample:
  - interface ethernet 1/2
  - description test-interface
  - mtu 512
  - exit
  type: list