ansible.builtin.nxos_portchannel (v2.3.3.0-1) — module

Manages port-channel interfaces.

| "added in version" 2.2 of ansible.builtin"

Authors: Jason Edelman (@jedelman8), Gabriele Gerbino (@GGabriele)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.3.3.0.post1

Description

Manages port-channel specific configuration parameters.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Ensure port-channel99 is created, add two members, and set to mode on
- nxos_portchannel:
    group: 99
    members: ['Ethernet1/1','Ethernet1/2']
    mode: 'active'
    state: present
    username: "{{ un }}"
    password: "{{ pwd }}"
    host: "{{ inventory_hostname }}"

Inputs

    
mode:
    choices:
    - active
    - passive
    - 'on'
    default: true
    description:
    - Mode for the port-channel, i.e. on, active, passive.
    required: false

force:
    choices:
    - 'true'
    - 'false'
    default: false
    description:
    - When true it forces port-channel members to match what is declared in the members
      param. This can be used to remove members.
    required: false

group:
    description:
    - Channel-group number for the port-channel.
    required: true

state:
    choices:
    - present
    - absent
    default: present
    description:
    - Manage the state of the resource.
    required: false

members:
    default: null
    description:
    - List of interfaces that will be managed in a given portchannel.
    required: false

min_links:
    default: null
    description:
    - Min links required to keep portchannel up.
    required: false

Outputs

changed:
  description: check to see if a change was made on the device
  returned: always
  sample: true
  type: boolean
end_state:
  description: k/v pairs of portchannel info after module execution
  returned: always
  sample:
    group: '12'
    members:
    - Ethernet2/5
    - Ethernet2/6
    members_detail:
      Ethernet2/5:
        mode: 'on'
        status: D
      Ethernet2/6:
        mode: 'on'
        status: D
    min_links: null
    mode: 'on'
  type: dict
existing:
  description:
  - k/v pairs of existing portchannel
  returned: always
  sample:
    group: '12'
    members:
    - Ethernet2/5
    - Ethernet2/6
    members_detail:
      Ethernet2/5:
        mode: active
        status: D
      Ethernet2/6:
        mode: active
        status: D
    min_links: null
    mode: active
  type: dict
proposed:
  description: k/v pairs of parameters passed into module
  returned: always
  sample:
    group: '12'
    members:
    - Ethernet2/5
    - Ethernet2/6
    mode: 'on'
  type: dict
updates:
  description: command sent to the device
  returned: always
  sample:
  - interface Ethernet2/6
  - no channel-group 12
  - interface Ethernet2/5
  - no channel-group 12
  - interface Ethernet2/6
  - channel-group 12 mode on
  - interface Ethernet2/5
  - channel-group 12 mode on
  type: list