cisco / cisco.nxos / 7.0.0 / module / nxos_zone_zoneset Configuration of zone/zoneset for Cisco NXOS MDS Switches. | "added in version" 1.0.0 of cisco.nxos" Authors: Suhas Bharadwaj (@srbharadwaj) (subharad@cisco.com)cisco.nxos.nxos_zone_zoneset (7.0.0) — module
Install with ansible-galaxy collection install cisco.nxos:==7.0.0
collections: - name: cisco.nxos version: 7.0.0
Configuration of zone/zoneset for Cisco MDS NXOS.
- name: Test that zone/zoneset module works cisco.nxos.nxos_zone_zoneset: zone_zoneset_details: - mode: enhanced vsan: 22 zone: - members: - pwwn: 31314874576271 - device_alias: test123 - pwwn: '61:61:62:62:12:12:12:12' remove: true name: zoneA - members: - pwwn: 28515514576271 - 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: 31314874576271 - 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: 28515514576271 - pwwn: '62:62:62:62:21:21:21:21' name: zone21B zoneset: - action: activate members: - name: zone21A - name: zone21B name: zsetname212
zone_zoneset_details: description: - List of zone/zoneset details to be added or removed elements: dict suboptions: default_zone: choices: - permit - deny description: - default zone behaviour for the vsan type: str mode: choices: - enhanced - basic description: - mode of the zone for the vsan type: str smart_zoning: description: - Removes the vsan if True type: bool vsan: description: - vsan id required: true type: int zone: description: - List of zone options for that vsan elements: dict suboptions: members: description: - Members of the zone that needs to be removed or added elements: dict suboptions: devtype: choices: - initiator - target - both description: - devtype of the zone member used along with Smart zoning config type: str pwwn: aliases: - device_alias description: - pwwn member of the zone, use alias 'device_alias' as option for device_alias member required: true type: str remove: default: false description: - Removes member from the zone if True type: bool type: list name: description: - name of the zone required: true type: str remove: default: false description: - Deletes the zone if True type: bool type: list zoneset: description: - List of zoneset options for the vsan elements: dict suboptions: action: choices: - activate - deactivate description: - activates/de-activates the zoneset type: str members: description: - Members of the zoneset that needs to be removed or added elements: dict suboptions: name: description: - name of the zone that needs to be added to the zoneset or removed from the zoneset required: true type: str remove: default: false description: - Removes zone member from the zoneset type: bool type: list name: description: - name of the zoneset required: true type: str remove: default: false description: - Removes zoneset if True type: bool type: list type: list
commands: 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 type: list messages: description: debug messages returned: always sample: - zone mode is already enhanced ,no change in zone mode configuration for vsan 922 - zone member '11:11:11:11:11:11:11:11' is already present in zone 'zoneA' in vsan 922 hence nothing to add - zone member 'test123' is already present in zone 'zoneA' in vsan 922 hence nothing to add - zone member '61:61:62:62:12:12:12:12' is not present in zone 'zoneA' in vsan 922 hence nothing to remove - zone member '10:11:11:11:11:11:11:11' is already present in zone 'zoneB' in vsan 922 hence nothing to add - zone member '62:62:62:62:21:21:21:21' is already present in zone 'zoneB' in vsan 922 hence nothing to add - zone 'zoneC' is not present in vsan 922 , so nothing to remove type: list