cisco.nxos.nxos_udld_interface (7.0.0) — module

Manages UDLD interface configuration params.

| "added in version" 1.0.0 of cisco.nxos"

Authors: Jason Edelman (@jedelman8)

Install collection

Install with ansible-galaxy collection install cisco.nxos:==7.0.0


Add to requirements.yml

  collections:
    - name: cisco.nxos
      version: 7.0.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
- cisco.nxos.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)
- cisco.nxos.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
- cisco.nxos.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
    type: str

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

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

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