ansible.builtin.nxos_udld_interface (v2.9.0) — module

Manages UDLD interface configuration params.

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

Authors: Jason Edelman (@jedelman8)

preview | supported by network

Install Ansible via pip

Install with pip install ansible==2.9.0

Description

Manages UDLD interface configuration params.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# ensure Ethernet1/1 is configured to be in aggressive mode
- nxos_udld_interface:
    interface: Ethernet1/1
    mode: aggressive
    state: present
    host: "{{ inventory_hostname }}"
    username: "{{ un }}"
    password: "{{ pwd }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Remove the aggressive config only if it's currently in aggressive mode and then disable udld (switch default)
- nxos_udld_interface:
    interface: Ethernet1/1
    mode: aggressive
    state: absent
    host: "{{ inventory_hostname }}"
    username: "{{ un }}"
    password: "{{ pwd }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# ensure Ethernet1/1 has aggressive mode enabled
- nxos_udld_interface:
    interface: Ethernet1/1
    mode: enabled
    host: "{{ inventory_hostname }}"
    username: "{{ un }}"
    password: "{{ pwd }}"

Inputs

    
mode:
    choices:
    - enabled
    - disabled
    - aggressive
    description:
    - Manages UDLD mode for an interface.
    required: true

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

interface:
    description:
    - FULL name of the interface, i.e. Ethernet1/1-
    required: true

Outputs

changed:
  description: check to see if a change was made on the device
  returned: always
  sample: true
  type: bool
end_state:
  description: k/v pairs of configuration after module execution
  returned: always
  sample:
    mode: enabled
  type: dict
existing:
  description:
  - k/v pairs of existing configuration
  returned: always
  sample:
    mode: aggressive
  type: dict
proposed:
  description: k/v pairs of parameters passed into module
  returned: always
  sample:
    mode: enabled
  type: dict
updates:
  description: command sent to the device
  returned: always
  sample:
  - interface ethernet1/33
  - no udld aggressive ; no udld disable
  type: list