cisco.nxos.nxos_devicealias – Configuration of device alias for Cisco NXOS MDS Switches.
Note
This plugin is part of the cisco.nxos collection (version 2.8.2).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install cisco.nxos
.
To use it in a playbook, specify: cisco.nxos.nxos_devicealias
.
New in version 1.0.0: of cisco.nxos
Synopsis
Configuration of device alias for Cisco MDS NXOS.
Note
This module has a corresponding action plugin.
Parameters
Parameter |
Comments |
---|---|
List of device-alias to be added or removed |
|
Name of the device-alias to be added or removed |
|
pwwn to which the name needs to be associated with |
|
Removes the device-alias if set to True Choices:
|
|
Enable/Disable device-alias distribution Choices:
|
|
Mode of devices-alias, basic or enhanced Choices:
|
|
List of device-alias to be renamed |
|
New name of the device-alias |
|
Old name of the device-alias that needs to be renamed |
Examples
- name: Test that device alias module works
cisco.nxos.nxos_devicealias:
da:
- name: test1_add
pwwn: 56:2:22:11:22:88:11:67
- name: test2_add
pwwn: 65:22:22:11:22:22:11:d
- name: dev1
remove: true
- name: dev2
remove: true
distribute: true
mode: enhanced
rename:
- new_name: bcd
old_name: abc
- new_name: bcd1
old_name: abc1
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
commands sent to the device Returned: always Sample: [“terminal dont-ask”, “device-alias database”, “device-alias name somename pwwn 10:00:00:00:89:a1:01:03”, “device-alias name somename1 pwwn 10:00:00:00:89:a1:02:03”, “device-alias commit”, “no terminal dont-ask”] |
Authors
Suhas Bharadwaj (@srbharadwaj) (subharad@cisco.com)