| 1 |
.. _cisco.nxos.nxos_zone_zoneset_module: |
| 2 |
|
| 3 |
|
| 4 |
**************************** |
| 5 |
cisco.nxos.nxos_zone_zoneset |
| 6 |
**************************** |
| 7 |
|
| 8 |
**Configuration of zone/zoneset for Cisco NXOS MDS Switches.** |
| 9 |
|
| 10 |
|
| 11 |
Version added: 1.0.0 |
| 12 |
|
| 13 |
.. contents:: |
| 14 |
:local: |
| 15 |
:depth: 1 |
| 16 |
|
| 17 |
|
| 18 |
Synopsis |
| 19 |
-------- |
| 20 |
- Configuration of zone/zoneset for Cisco MDS NXOS. |
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
Parameters |
| 26 |
---------- |
| 27 |
|
| 28 |
.. raw:: html |
| 29 |
|
| 30 |
<table border=0 cellpadding=0 class="documentation-table"> |
| 31 |
<tr> |
| 32 |
<th colspan="4">Parameter</th> |
| 33 |
<th>Choices/<font color="blue">Defaults</font></th> |
| 34 |
<th width="100%">Comments</th> |
| 35 |
</tr> |
| 36 |
<tr> |
| 37 |
<td colspan="4"> |
| 38 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 39 |
<b>zone_zoneset_details</b> |
| 40 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 41 |
<div style="font-size: small"> |
| 42 |
<span style="color: purple">list</span> |
| 43 |
/ <span style="color: purple">elements=dictionary</span> |
| 44 |
</div> |
| 45 |
</td> |
| 46 |
<td> |
| 47 |
</td> |
| 48 |
<td> |
| 49 |
<div>List of zone/zoneset details to be added or removed</div> |
| 50 |
</td> |
| 51 |
</tr> |
| 52 |
<tr> |
| 53 |
<td class="elbow-placeholder"></td> |
| 54 |
<td colspan="3"> |
| 55 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 56 |
<b>default_zone</b> |
| 57 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 58 |
<div style="font-size: small"> |
| 59 |
<span style="color: purple">string</span> |
| 60 |
</div> |
| 61 |
</td> |
| 62 |
<td> |
| 63 |
<ul style="margin: 0; padding: 0"><b>Choices:</b> |
| 64 |
<li>permit</li> |
| 65 |
<li>deny</li> |
| 66 |
</ul> |
| 67 |
</td> |
| 68 |
<td> |
| 69 |
<div>default zone behaviour for the vsan</div> |
| 70 |
</td> |
| 71 |
</tr> |
| 72 |
<tr> |
| 73 |
<td class="elbow-placeholder"></td> |
| 74 |
<td colspan="3"> |
| 75 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 76 |
<b>mode</b> |
| 77 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 78 |
<div style="font-size: small"> |
| 79 |
<span style="color: purple">string</span> |
| 80 |
</div> |
| 81 |
</td> |
| 82 |
<td> |
| 83 |
<ul style="margin: 0; padding: 0"><b>Choices:</b> |
| 84 |
<li>enhanced</li> |
| 85 |
<li>basic</li> |
| 86 |
</ul> |
| 87 |
</td> |
| 88 |
<td> |
| 89 |
<div>mode of the zone for the vsan</div> |
| 90 |
</td> |
| 91 |
</tr> |
| 92 |
<tr> |
| 93 |
<td class="elbow-placeholder"></td> |
| 94 |
<td colspan="3"> |
| 95 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 96 |
<b>smart_zoning</b> |
| 97 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 98 |
<div style="font-size: small"> |
| 99 |
<span style="color: purple">boolean</span> |
| 100 |
</div> |
| 101 |
</td> |
| 102 |
<td> |
| 103 |
<ul style="margin: 0; padding: 0"><b>Choices:</b> |
| 104 |
<li>no</li> |
| 105 |
<li>yes</li> |
| 106 |
</ul> |
| 107 |
</td> |
| 108 |
<td> |
| 109 |
<div>Removes the vsan if True</div> |
| 110 |
</td> |
| 111 |
</tr> |
| 112 |
<tr> |
| 113 |
<td class="elbow-placeholder"></td> |
| 114 |
<td colspan="3"> |
| 115 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 116 |
<b>vsan</b> |
| 117 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 118 |
<div style="font-size: small"> |
| 119 |
<span style="color: purple">integer</span> |
| 120 |
/ <span style="color: red">required</span> |
| 121 |
</div> |
| 122 |
</td> |
| 123 |
<td> |
| 124 |
</td> |
| 125 |
<td> |
| 126 |
<div>vsan id</div> |
| 127 |
</td> |
| 128 |
</tr> |
| 129 |
<tr> |
| 130 |
<td class="elbow-placeholder"></td> |
| 131 |
<td colspan="3"> |
| 132 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 133 |
<b>zone</b> |
| 134 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 135 |
<div style="font-size: small"> |
| 136 |
<span style="color: purple">list</span> |
| 137 |
/ <span style="color: purple">elements=dictionary</span> |
| 138 |
</div> |
| 139 |
</td> |
| 140 |
<td> |
| 141 |
</td> |
| 142 |
<td> |
| 143 |
<div>List of zone options for that vsan</div> |
| 144 |
</td> |
| 145 |
</tr> |
| 146 |
<tr> |
| 147 |
<td class="elbow-placeholder"></td> |
| 148 |
<td class="elbow-placeholder"></td> |
| 149 |
<td colspan="2"> |
| 150 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 151 |
<b>members</b> |
| 152 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 153 |
<div style="font-size: small"> |
| 154 |
<span style="color: purple">list</span> |
| 155 |
/ <span style="color: purple">elements=dictionary</span> |
| 156 |
</div> |
| 157 |
</td> |
| 158 |
<td> |
| 159 |
</td> |
| 160 |
<td> |
| 161 |
<div>Members of the zone that needs to be removed or added</div> |
| 162 |
</td> |
| 163 |
</tr> |
| 164 |
<tr> |
| 165 |
<td class="elbow-placeholder"></td> |
| 166 |
<td class="elbow-placeholder"></td> |
| 167 |
<td class="elbow-placeholder"></td> |
| 168 |
<td colspan="1"> |
| 169 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 170 |
<b>devtype</b> |
| 171 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 172 |
<div style="font-size: small"> |
| 173 |
<span style="color: purple">string</span> |
| 174 |
</div> |
| 175 |
</td> |
| 176 |
<td> |
| 177 |
<ul style="margin: 0; padding: 0"><b>Choices:</b> |
| 178 |
<li>initiator</li> |
| 179 |
<li>target</li> |
| 180 |
<li>both</li> |
| 181 |
</ul> |
| 182 |
</td> |
| 183 |
<td> |
| 184 |
<div>devtype of the zone member used along with Smart zoning config</div> |
| 185 |
</td> |
| 186 |
</tr> |
| 187 |
<tr> |
| 188 |
<td class="elbow-placeholder"></td> |
| 189 |
<td class="elbow-placeholder"></td> |
| 190 |
<td class="elbow-placeholder"></td> |
| 191 |
<td colspan="1"> |
| 192 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 193 |
<b>pwwn</b> |
| 194 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 195 |
<div style="font-size: small"> |
| 196 |
<span style="color: purple">string</span> |
| 197 |
/ <span style="color: red">required</span> |
| 198 |
</div> |
| 199 |
</td> |
| 200 |
<td> |
| 201 |
</td> |
| 202 |
<td> |
| 203 |
<div>pwwn member of the zone, use alias 'device_alias' as option for device_alias member</div> |
| 204 |
<div style="font-size: small; color: darkgreen"><br/>aliases: device_alias</div> |
| 205 |
</td> |
| 206 |
</tr> |
| 207 |
<tr> |
| 208 |
<td class="elbow-placeholder"></td> |
| 209 |
<td class="elbow-placeholder"></td> |
| 210 |
<td class="elbow-placeholder"></td> |
| 211 |
<td colspan="1"> |
| 212 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 213 |
<b>remove</b> |
| 214 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 215 |
<div style="font-size: small"> |
| 216 |
<span style="color: purple">boolean</span> |
| 217 |
</div> |
| 218 |
</td> |
| 219 |
<td> |
| 220 |
<ul style="margin: 0; padding: 0"><b>Choices:</b> |
| 221 |
<li><div style="color: blue"><b>no</b> ←</div></li> |
| 222 |
<li>yes</li> |
| 223 |
</ul> |
| 224 |
</td> |
| 225 |
<td> |
| 226 |
<div>Removes member from the zone if True</div> |
| 227 |
</td> |
| 228 |
</tr> |
| 229 |
|
| 230 |
<tr> |
| 231 |
<td class="elbow-placeholder"></td> |
| 232 |
<td class="elbow-placeholder"></td> |
| 233 |
<td colspan="2"> |
| 234 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 235 |
<b>name</b> |
| 236 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 237 |
<div style="font-size: small"> |
| 238 |
<span style="color: purple">string</span> |
| 239 |
/ <span style="color: red">required</span> |
| 240 |
</div> |
| 241 |
</td> |
| 242 |
<td> |
| 243 |
</td> |
| 244 |
<td> |
| 245 |
<div>name of the zone</div> |
| 246 |
</td> |
| 247 |
</tr> |
| 248 |
<tr> |
| 249 |
<td class="elbow-placeholder"></td> |
| 250 |
<td class="elbow-placeholder"></td> |
| 251 |
<td colspan="2"> |
| 252 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 253 |
<b>remove</b> |
| 254 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 255 |
<div style="font-size: small"> |
| 256 |
<span style="color: purple">boolean</span> |
| 257 |
</div> |
| 258 |
</td> |
| 259 |
<td> |
| 260 |
<ul style="margin: 0; padding: 0"><b>Choices:</b> |
| 261 |
<li><div style="color: blue"><b>no</b> ←</div></li> |
| 262 |
<li>yes</li> |
| 263 |
</ul> |
| 264 |
</td> |
| 265 |
<td> |
| 266 |
<div>Deletes the zone if True</div> |
| 267 |
</td> |
| 268 |
</tr> |
| 269 |
|
| 270 |
<tr> |
| 271 |
<td class="elbow-placeholder"></td> |
| 272 |
<td colspan="3"> |
| 273 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 274 |
<b>zoneset</b> |
| 275 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 276 |
<div style="font-size: small"> |
| 277 |
<span style="color: purple">list</span> |
| 278 |
/ <span style="color: purple">elements=dictionary</span> |
| 279 |
</div> |
| 280 |
</td> |
| 281 |
<td> |
| 282 |
</td> |
| 283 |
<td> |
| 284 |
<div>List of zoneset options for the vsan</div> |
| 285 |
</td> |
| 286 |
</tr> |
| 287 |
<tr> |
| 288 |
<td class="elbow-placeholder"></td> |
| 289 |
<td class="elbow-placeholder"></td> |
| 290 |
<td colspan="2"> |
| 291 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 292 |
<b>action</b> |
| 293 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 294 |
<div style="font-size: small"> |
| 295 |
<span style="color: purple">string</span> |
| 296 |
</div> |
| 297 |
</td> |
| 298 |
<td> |
| 299 |
<ul style="margin: 0; padding: 0"><b>Choices:</b> |
| 300 |
<li>activate</li> |
| 301 |
<li>deactivate</li> |
| 302 |
</ul> |
| 303 |
</td> |
| 304 |
<td> |
| 305 |
<div>activates/de-activates the zoneset</div> |
| 306 |
</td> |
| 307 |
</tr> |
| 308 |
<tr> |
| 309 |
<td class="elbow-placeholder"></td> |
| 310 |
<td class="elbow-placeholder"></td> |
| 311 |
<td colspan="2"> |
| 312 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 313 |
<b>members</b> |
| 314 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 315 |
<div style="font-size: small"> |
| 316 |
<span style="color: purple">list</span> |
| 317 |
/ <span style="color: purple">elements=dictionary</span> |
| 318 |
</div> |
| 319 |
</td> |
| 320 |
<td> |
| 321 |
</td> |
| 322 |
<td> |
| 323 |
<div>Members of the zoneset that needs to be removed or added</div> |
| 324 |
</td> |
| 325 |
</tr> |
| 326 |
<tr> |
| 327 |
<td class="elbow-placeholder"></td> |
| 328 |
<td class="elbow-placeholder"></td> |
| 329 |
<td class="elbow-placeholder"></td> |
| 330 |
<td colspan="1"> |
| 331 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 332 |
<b>name</b> |
| 333 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 334 |
<div style="font-size: small"> |
| 335 |
<span style="color: purple">string</span> |
| 336 |
/ <span style="color: red">required</span> |
| 337 |
</div> |
| 338 |
</td> |
| 339 |
<td> |
| 340 |
</td> |
| 341 |
<td> |
| 342 |
<div>name of the zone that needs to be added to the zoneset or removed from the zoneset</div> |
| 343 |
</td> |
| 344 |
</tr> |
| 345 |
<tr> |
| 346 |
<td class="elbow-placeholder"></td> |
| 347 |
<td class="elbow-placeholder"></td> |
| 348 |
<td class="elbow-placeholder"></td> |
| 349 |
<td colspan="1"> |
| 350 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 351 |
<b>remove</b> |
| 352 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 353 |
<div style="font-size: small"> |
| 354 |
<span style="color: purple">boolean</span> |
| 355 |
</div> |
| 356 |
</td> |
| 357 |
<td> |
| 358 |
<ul style="margin: 0; padding: 0"><b>Choices:</b> |
| 359 |
<li><div style="color: blue"><b>no</b> ←</div></li> |
| 360 |
<li>yes</li> |
| 361 |
</ul> |
| 362 |
</td> |
| 363 |
<td> |
| 364 |
<div>Removes zone member from the zoneset</div> |
| 365 |
</td> |
| 366 |
</tr> |
| 367 |
|
| 368 |
<tr> |
| 369 |
<td class="elbow-placeholder"></td> |
| 370 |
<td class="elbow-placeholder"></td> |
| 371 |
<td colspan="2"> |
| 372 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 373 |
<b>name</b> |
| 374 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 375 |
<div style="font-size: small"> |
| 376 |
<span style="color: purple">string</span> |
| 377 |
/ <span style="color: red">required</span> |
| 378 |
</div> |
| 379 |
</td> |
| 380 |
<td> |
| 381 |
</td> |
| 382 |
<td> |
| 383 |
<div>name of the zoneset</div> |
| 384 |
</td> |
| 385 |
</tr> |
| 386 |
<tr> |
| 387 |
<td class="elbow-placeholder"></td> |
| 388 |
<td class="elbow-placeholder"></td> |
| 389 |
<td colspan="2"> |
| 390 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 391 |
<b>remove</b> |
| 392 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 393 |
<div style="font-size: small"> |
| 394 |
<span style="color: purple">boolean</span> |
| 395 |
</div> |
| 396 |
</td> |
| 397 |
<td> |
| 398 |
<ul style="margin: 0; padding: 0"><b>Choices:</b> |
| 399 |
<li><div style="color: blue"><b>no</b> ←</div></li> |
| 400 |
<li>yes</li> |
| 401 |
</ul> |
| 402 |
</td> |
| 403 |
<td> |
| 404 |
<div>Removes zoneset if True</div> |
| 405 |
</td> |
| 406 |
</tr> |
| 407 |
|
| 408 |
|
| 409 |
</table> |
| 410 |
<br/> |
| 411 |
|
| 412 |
|
| 413 |
Notes |
| 414 |
----- |
| 415 |
|
| 416 |
.. note:: |
| 417 |
- Tested against Cisco MDS NX-OS 8.4(1) |
| 418 |
|
| 419 |
|
| 420 |
|
| 421 |
Examples |
| 422 |
-------- |
| 423 |
|
| 424 |
.. code-block:: yaml |
| 425 |
|
| 426 |
- name: Test that zone/zoneset module works |
| 427 |
cisco.nxos.nxos_zone_zoneset: |
| 428 |
zone_zoneset_details: |
| 429 |
- mode: enhanced |
| 430 |
vsan: 22 |
| 431 |
zone: |
| 432 |
- members: |
| 433 |
- pwwn: 31314874576271 |
| 434 |
- device_alias: test123 |
| 435 |
- pwwn: '61:61:62:62:12:12:12:12' |
| 436 |
remove: true |
| 437 |
name: zoneA |
| 438 |
- members: |
| 439 |
- pwwn: 28515514576271 |
| 440 |
- pwwn: '62:62:62:62:21:21:21:21' |
| 441 |
name: zoneB |
| 442 |
- name: zoneC |
| 443 |
remove: true |
| 444 |
zoneset: |
| 445 |
- action: activate |
| 446 |
members: |
| 447 |
- name: zoneA |
| 448 |
- name: zoneB |
| 449 |
- name: zoneC |
| 450 |
remove: true |
| 451 |
name: zsetname1 |
| 452 |
- action: deactivate |
| 453 |
name: zsetTestExtra |
| 454 |
remove: true |
| 455 |
- mode: basic |
| 456 |
smart_zoning: true |
| 457 |
vsan: 21 |
| 458 |
zone: |
| 459 |
- members: |
| 460 |
- devtype: both |
| 461 |
pwwn: 31314874576271 |
| 462 |
- pwwn: '62:62:62:62:12:12:12:12' |
| 463 |
- devtype: both |
| 464 |
pwwn: '92:62:62:62:12:12:1a:1a' |
| 465 |
remove: true |
| 466 |
name: zone21A |
| 467 |
- members: |
| 468 |
- pwwn: 28515514576271 |
| 469 |
- pwwn: '62:62:62:62:21:21:21:21' |
| 470 |
name: zone21B |
| 471 |
zoneset: |
| 472 |
- action: activate |
| 473 |
members: |
| 474 |
- name: zone21A |
| 475 |
- name: zone21B |
| 476 |
name: zsetname212 |
| 477 |
|
| 478 |
|
| 479 |
|
| 480 |
Return Values |
| 481 |
------------- |
| 482 |
Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module: |
| 483 |
|
| 484 |
.. raw:: html |
| 485 |
|
| 486 |
<table border=0 cellpadding=0 class="documentation-table"> |
| 487 |
<tr> |
| 488 |
<th colspan="1">Key</th> |
| 489 |
<th>Returned</th> |
| 490 |
<th width="100%">Description</th> |
| 491 |
</tr> |
| 492 |
<tr> |
| 493 |
<td colspan="1"> |
| 494 |
<div class="ansibleOptionAnchor" id="return-"></div> |
| 495 |
<b>commands</b> |
| 496 |
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> |
| 497 |
<div style="font-size: small"> |
| 498 |
<span style="color: purple">list</span> |
| 499 |
</div> |
| 500 |
</td> |
| 501 |
<td>always</td> |
| 502 |
<td> |
| 503 |
<div>commands sent to the device</div> |
| 504 |
<br/> |
| 505 |
<div style="font-size: smaller"><b>Sample:</b></div> |
| 506 |
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">['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']</div> |
| 507 |
</td> |
| 508 |
</tr> |
| 509 |
<tr> |
| 510 |
<td colspan="1"> |
| 511 |
<div class="ansibleOptionAnchor" id="return-"></div> |
| 512 |
<b>messages</b> |
| 513 |
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> |
| 514 |
<div style="font-size: small"> |
| 515 |
<span style="color: purple">list</span> |
| 516 |
</div> |
| 517 |
</td> |
| 518 |
<td>always</td> |
| 519 |
<td> |
| 520 |
<div>debug messages</div> |
| 521 |
<br/> |
| 522 |
<div style="font-size: smaller"><b>Sample:</b></div> |
| 523 |
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">['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"]</div> |
| 524 |
</td> |
| 525 |
</tr> |
| 526 |
</table> |
| 527 |
<br/><br/> |
| 528 |
|
| 529 |
|
| 530 |
Status |
| 531 |
------ |
| 532 |
|
| 533 |
|
| 534 |
Authors |
| 535 |
~~~~~~~ |
| 536 |
|
| 537 |
- Suhas Bharadwaj (@srbharadwaj) ([email protected]) |