cisco.nxos.nxos_zone_zoneset – Configuration of zone/zoneset 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_zone_zoneset
.
New in version 1.0.0: of cisco.nxos
Synopsis
Configuration of zone/zoneset for Cisco MDS NXOS.
Note
This module has a corresponding action plugin.
Parameters
Parameter |
Comments |
---|---|
List of zone/zoneset details to be added or removed |
|
default zone behaviour for the vsan Choices:
|
|
mode of the zone for the vsan Choices:
|
|
Removes the vsan if True Choices:
|
|
vsan id |
|
List of zone options for that vsan |
|
Members of the zone that needs to be removed or added |
|
devtype of the zone member used along with Smart zoning config Choices:
|
|
pwwn member of the zone, use alias ‘device_alias’ as option for device_alias member |
|
Removes member from the zone if True Choices:
|
|
name of the zone |
|
Deletes the zone if True Choices:
|
|
List of zoneset options for the vsan |
|
activates/de-activates the zoneset Choices:
|
|
Members of the zoneset that needs to be removed or added |
|
name of the zone that needs to be added to the zoneset or removed from the zoneset |
|
Removes zone member from the zoneset Choices:
|
|
name of the zoneset |
|
Removes zoneset if True Choices:
|
Examples
- name: Test that zone/zoneset module works
cisco.nxos.nxos_zone_zoneset:
zone_zoneset_details:
- mode: enhanced
vsan: 22
zone:
- members:
- pwwn: 11:11:11:11:11:11:11:11
- device_alias: test123
- pwwn: 61:61:62:62:12:12:12:12
remove: true
name: zoneA
- members:
- pwwn: 10:11:11:11:11:11:11:11
- pwwn: 62:62:62:62:21:21:21:21
name: zoneB
- name: zoneC
remove: true
zoneset:
- action: activate
members:
- name: zoneA
- name: zoneB
- name: zoneC
remove: true
name: zsetname1
- action: deactivate
name: zsetTestExtra
remove: true
- mode: basic
smart_zoning: true
vsan: 21
zone:
- members:
- devtype: both
pwwn: 11:11:11:11:11:11:11:11
- pwwn: 62:62:62:62:12:12:12:12
- devtype: both
pwwn: 92:62:62:62:12:12:1a:1a
remove: true
name: zone21A
- members:
- pwwn: 10:11:11:11:11:11:11:11
- pwwn: 62:62:62:62:21:21:21:21
name: zone21B
zoneset:
- action: activate
members:
- name: zone21A
- name: zone21B
name: zsetname212
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”, “zone name zoneA vsan 923”, “member pwwn 11:11:11:11:11:11:11:11”, “no member device-alias test123”, “zone commit vsan 923”, “no terminal dont-ask”] |
|
debug messages Returned: always Sample: [“zone mode is already enhanced ,no change in zone mode configuration for vsan 922”, “zone member \u002711:11:11:11:11:11:11:11\u0027 is already present in zone \u0027zoneA\u0027 in vsan 922 hence nothing to add”, “zone member \u0027test123\u0027 is already present in zone \u0027zoneA\u0027 in vsan 922 hence nothing to add”, “zone member \u002761:61:62:62:12:12:12:12\u0027 is not present in zone \u0027zoneA\u0027 in vsan 922 hence nothing to remove”, “zone member \u002710:11:11:11:11:11:11:11\u0027 is already present in zone \u0027zoneB\u0027 in vsan 922 hence nothing to add”, “zone member \u002762:62:62:62:21:21:21:21\u0027 is already present in zone \u0027zoneB\u0027 in vsan 922 hence nothing to add”, “zone \u0027zoneC\u0027 is not present in vsan 922 , so nothing to remove”] |
Authors
Suhas Bharadwaj (@srbharadwaj) (subharad@cisco.com)