.. _cisco.nxos.nxos_udld_interface_module:
******************************
cisco.nxos.nxos_udld_interface
******************************
**Manages UDLD interface configuration params.**
Version added: 1.0.0
.. contents::
:local:
:depth: 1
Synopsis
--------
- Manages UDLD interface configuration params.
Parameters
----------
.. raw:: html
| Parameter |
Choices/Defaults |
Comments |
|
interface
string
/ required
|
|
FULL name of the interface, i.e. Ethernet1/1-
|
|
mode
string
/ required
|
Choices:
- enabled
- disabled
- aggressive
|
Manages UDLD mode for an interface.
|
|
state
string
|
Choices:
present ←
- absent
|
Manage the state of the resource.
|
Notes
-----
.. note::
- Tested against NXOSv 7.3.(0)D1(1) on VIRL
- Unsupported for Cisco MDS
- Feature UDLD must be enabled on the device to use this module.
- For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide `
- For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide `
- For more information on using Ansible to manage Cisco devices see the `Cisco integration page `_.
Examples
--------
.. code-block:: yaml
# 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 }}'
# 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 }}'
# ensure Ethernet1/1 has aggressive mode enabled
- cisco.nxos.nxos_udld_interface:
interface: Ethernet1/1
mode: enabled
host: '{{ inventory_hostname }}'
username: '{{ un }}'
password: '{{ pwd }}'
Return Values
-------------
Common return values are documented `here `_, the following are the fields unique to this module:
.. raw:: html
| Key |
Returned |
Description |
|
changed
boolean
|
always |
check to see if a change was made on the device
Sample:
True
|
|
end_state
dictionary
|
always |
k/v pairs of configuration after module execution
Sample:
{'mode': 'enabled'}
|
|
existing
dictionary
|
always |
k/v pairs of existing configuration
Sample:
{'mode': 'aggressive'}
|
|
proposed
dictionary
|
always |
k/v pairs of parameters passed into module
Sample:
{'mode': 'enabled'}
|
|
updates
list
|
always |
command sent to the device
Sample:
['interface ethernet1/33', 'no udld aggressive ; no udld disable']
|
Status
------
Authors
~~~~~~~
- Jason Edelman (@jedelman8)