| 1 |
.. _cisco.ios.ios_vlans_module: |
| 2 |
|
| 3 |
|
| 4 |
******************* |
| 5 |
cisco.ios.ios_vlans |
| 6 |
******************* |
| 7 |
|
| 8 |
**Resource module to configure VLANs.** |
| 9 |
|
| 10 |
|
| 11 |
Version added: 1.0.0 |
| 12 |
|
| 13 |
.. contents:: |
| 14 |
:local: |
| 15 |
:depth: 1 |
| 16 |
|
| 17 |
|
| 18 |
Synopsis |
| 19 |
-------- |
| 20 |
- This module provides declarative management of VLANs on Cisco IOS network devices. |
| 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="3">Parameter</th> |
| 33 |
<th>Choices/<font color="blue">Defaults</font></th> |
| 34 |
<th width="100%">Comments</th> |
| 35 |
</tr> |
| 36 |
<tr> |
| 37 |
<td colspan="3"> |
| 38 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 39 |
<b>config</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>A dictionary of VLANs options</div> |
| 50 |
</td> |
| 51 |
</tr> |
| 52 |
<tr> |
| 53 |
<td class="elbow-placeholder"></td> |
| 54 |
<td colspan="2"> |
| 55 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 56 |
<b>member</b> |
| 57 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 58 |
<div style="font-size: small"> |
| 59 |
<span style="color: purple">dictionary</span> |
| 60 |
</div> |
| 61 |
</td> |
| 62 |
<td> |
| 63 |
</td> |
| 64 |
<td> |
| 65 |
<div>Members of VLAN</div> |
| 66 |
</td> |
| 67 |
</tr> |
| 68 |
<tr> |
| 69 |
<td class="elbow-placeholder"></td> |
| 70 |
<td class="elbow-placeholder"></td> |
| 71 |
<td colspan="1"> |
| 72 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 73 |
<b>evi</b> |
| 74 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 75 |
<div style="font-size: small"> |
| 76 |
<span style="color: purple">integer</span> |
| 77 |
</div> |
| 78 |
</td> |
| 79 |
<td> |
| 80 |
</td> |
| 81 |
<td> |
| 82 |
<div>Ethernet Virtual Private Network (EVPN)</div> |
| 83 |
</td> |
| 84 |
</tr> |
| 85 |
<tr> |
| 86 |
<td class="elbow-placeholder"></td> |
| 87 |
<td class="elbow-placeholder"></td> |
| 88 |
<td colspan="1"> |
| 89 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 90 |
<b>vni</b> |
| 91 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 92 |
<div style="font-size: small"> |
| 93 |
<span style="color: purple">integer</span> |
| 94 |
/ <span style="color: red">required</span> |
| 95 |
</div> |
| 96 |
</td> |
| 97 |
<td> |
| 98 |
</td> |
| 99 |
<td> |
| 100 |
<div>VXLAN vni</div> |
| 101 |
</td> |
| 102 |
</tr> |
| 103 |
|
| 104 |
<tr> |
| 105 |
<td class="elbow-placeholder"></td> |
| 106 |
<td colspan="2"> |
| 107 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 108 |
<b>mtu</b> |
| 109 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 110 |
<div style="font-size: small"> |
| 111 |
<span style="color: purple">integer</span> |
| 112 |
</div> |
| 113 |
</td> |
| 114 |
<td> |
| 115 |
</td> |
| 116 |
<td> |
| 117 |
<div>VLAN Maximum Transmission Unit.</div> |
| 118 |
<div>Refer to vendor documentation for valid values.</div> |
| 119 |
<div>This option is DEPRECATED use ios_interfaces to configure mtu, this attribute will be removed after 2027-01-01.</div> |
| 120 |
<div>mtu is collected as part of facts, but a mtu command wont be fired if the configuration is present in the playbook.</div> |
| 121 |
</td> |
| 122 |
</tr> |
| 123 |
<tr> |
| 124 |
<td class="elbow-placeholder"></td> |
| 125 |
<td colspan="2"> |
| 126 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 127 |
<b>name</b> |
| 128 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 129 |
<div style="font-size: small"> |
| 130 |
<span style="color: purple">string</span> |
| 131 |
</div> |
| 132 |
</td> |
| 133 |
<td> |
| 134 |
</td> |
| 135 |
<td> |
| 136 |
<div>Ascii name of the VLAN.</div> |
| 137 |
<div>NOTE, <em>name</em> should not be named/appended with <em>default</em> as it is reserved for device default vlans.</div> |
| 138 |
</td> |
| 139 |
</tr> |
| 140 |
<tr> |
| 141 |
<td class="elbow-placeholder"></td> |
| 142 |
<td colspan="2"> |
| 143 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 144 |
<b>private_vlan</b> |
| 145 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 146 |
<div style="font-size: small"> |
| 147 |
<span style="color: purple">dictionary</span> |
| 148 |
</div> |
| 149 |
</td> |
| 150 |
<td> |
| 151 |
</td> |
| 152 |
<td> |
| 153 |
<div>Options for private vlan configuration.</div> |
| 154 |
</td> |
| 155 |
</tr> |
| 156 |
<tr> |
| 157 |
<td class="elbow-placeholder"></td> |
| 158 |
<td class="elbow-placeholder"></td> |
| 159 |
<td colspan="1"> |
| 160 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 161 |
<b>associated</b> |
| 162 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 163 |
<div style="font-size: small"> |
| 164 |
<span style="color: purple">list</span> |
| 165 |
/ <span style="color: purple">elements=integer</span> |
| 166 |
</div> |
| 167 |
</td> |
| 168 |
<td> |
| 169 |
</td> |
| 170 |
<td> |
| 171 |
<div>List of private VLANs associated with the primary . Only works with `type: primary`.</div> |
| 172 |
</td> |
| 173 |
</tr> |
| 174 |
<tr> |
| 175 |
<td class="elbow-placeholder"></td> |
| 176 |
<td class="elbow-placeholder"></td> |
| 177 |
<td colspan="1"> |
| 178 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 179 |
<b>type</b> |
| 180 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 181 |
<div style="font-size: small"> |
| 182 |
<span style="color: purple">string</span> |
| 183 |
</div> |
| 184 |
</td> |
| 185 |
<td> |
| 186 |
<ul style="margin: 0; padding: 0"><b>Choices:</b> |
| 187 |
<li>primary</li> |
| 188 |
<li>isolated</li> |
| 189 |
<li>community</li> |
| 190 |
</ul> |
| 191 |
</td> |
| 192 |
<td> |
| 193 |
<div>Private VLAN type</div> |
| 194 |
</td> |
| 195 |
</tr> |
| 196 |
|
| 197 |
<tr> |
| 198 |
<td class="elbow-placeholder"></td> |
| 199 |
<td colspan="2"> |
| 200 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 201 |
<b>remote_span</b> |
| 202 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 203 |
<div style="font-size: small"> |
| 204 |
<span style="color: purple">boolean</span> |
| 205 |
</div> |
| 206 |
</td> |
| 207 |
<td> |
| 208 |
<ul style="margin: 0; padding: 0"><b>Choices:</b> |
| 209 |
<li>no</li> |
| 210 |
<li>yes</li> |
| 211 |
</ul> |
| 212 |
</td> |
| 213 |
<td> |
| 214 |
<div>Configure as Remote SPAN VLAN</div> |
| 215 |
</td> |
| 216 |
</tr> |
| 217 |
<tr> |
| 218 |
<td class="elbow-placeholder"></td> |
| 219 |
<td colspan="2"> |
| 220 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 221 |
<b>shutdown</b> |
| 222 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 223 |
<div style="font-size: small"> |
| 224 |
<span style="color: purple">string</span> |
| 225 |
</div> |
| 226 |
</td> |
| 227 |
<td> |
| 228 |
<ul style="margin: 0; padding: 0"><b>Choices:</b> |
| 229 |
<li>enabled</li> |
| 230 |
<li>disabled</li> |
| 231 |
</ul> |
| 232 |
</td> |
| 233 |
<td> |
| 234 |
<div>Specifies whether VLAN switching should be administratively enabled or disabled.</div> |
| 235 |
<div>When set to <code>enabled</code>, the VLAN interface is administratively shut down, which prevents it from forwarding traffic.</div> |
| 236 |
<div>When set to <code>disabled</code>, the VLAN interface is administratively enabled by issuing the internal <code>no shutdown</code> command, allowing it to forward traffic.</div> |
| 237 |
<div>The operational state of the VLAN depends on both the administrative state (<code>shutdown</code> or <code>no shutdown</code>) and the physical link status.</div> |
| 238 |
</td> |
| 239 |
</tr> |
| 240 |
<tr> |
| 241 |
<td class="elbow-placeholder"></td> |
| 242 |
<td colspan="2"> |
| 243 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 244 |
<b>state</b> |
| 245 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 246 |
<div style="font-size: small"> |
| 247 |
<span style="color: purple">string</span> |
| 248 |
</div> |
| 249 |
</td> |
| 250 |
<td> |
| 251 |
<ul style="margin: 0; padding: 0"><b>Choices:</b> |
| 252 |
<li>active</li> |
| 253 |
<li>suspend</li> |
| 254 |
</ul> |
| 255 |
</td> |
| 256 |
<td> |
| 257 |
<div>Operational state of the VLAN</div> |
| 258 |
</td> |
| 259 |
</tr> |
| 260 |
<tr> |
| 261 |
<td class="elbow-placeholder"></td> |
| 262 |
<td colspan="2"> |
| 263 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 264 |
<b>vlan_id</b> |
| 265 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 266 |
<div style="font-size: small"> |
| 267 |
<span style="color: purple">integer</span> |
| 268 |
/ <span style="color: red">required</span> |
| 269 |
</div> |
| 270 |
</td> |
| 271 |
<td> |
| 272 |
</td> |
| 273 |
<td> |
| 274 |
<div>ID of the VLAN. Range 1-4094</div> |
| 275 |
</td> |
| 276 |
</tr> |
| 277 |
|
| 278 |
<tr> |
| 279 |
<td colspan="3"> |
| 280 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 281 |
<b>running_config</b> |
| 282 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 283 |
<div style="font-size: small"> |
| 284 |
<span style="color: purple">string</span> |
| 285 |
</div> |
| 286 |
</td> |
| 287 |
<td> |
| 288 |
</td> |
| 289 |
<td> |
| 290 |
<div>This option is used only with state <em>parsed</em>.</div> |
| 291 |
<div>The value of this option should be the output received from the IOS device by executing the command <b>show vlan</b>.</div> |
| 292 |
<div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module's argspec and the value is then returned in the <em>parsed</em> key within the result.</div> |
| 293 |
</td> |
| 294 |
</tr> |
| 295 |
<tr> |
| 296 |
<td colspan="3"> |
| 297 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 298 |
<b>state</b> |
| 299 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 300 |
<div style="font-size: small"> |
| 301 |
<span style="color: purple">string</span> |
| 302 |
</div> |
| 303 |
</td> |
| 304 |
<td> |
| 305 |
<ul style="margin: 0; padding: 0"><b>Choices:</b> |
| 306 |
<li><div style="color: blue"><b>merged</b> ←</div></li> |
| 307 |
<li>replaced</li> |
| 308 |
<li>overridden</li> |
| 309 |
<li>deleted</li> |
| 310 |
<li>rendered</li> |
| 311 |
<li>gathered</li> |
| 312 |
<li>purged</li> |
| 313 |
<li>parsed</li> |
| 314 |
</ul> |
| 315 |
</td> |
| 316 |
<td> |
| 317 |
<div>The state the configuration should be left in</div> |
| 318 |
<div>The states <em>rendered</em>, <em>gathered</em> and <em>parsed</em> does not perform any change on the device.</div> |
| 319 |
<div>The state <em>rendered</em> will transform the configuration in <code>config</code> option to platform specific CLI commands which will be returned in the <em>rendered</em> key within the result. For state <em>rendered</em> active connection to remote host is not required.</div> |
| 320 |
<div>The state <em>gathered</em> will fetch the running configuration from device and transform it into structured data in the format as per the resource module argspec and the value is returned in the <em>gathered</em> key within the result.</div> |
| 321 |
<div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into JSON format as per the resource module parameters and the value is returned in the <em>parsed</em> key within the result. The value of <code>running_config</code> option should be the same format as the output of commands <em>show vlan</em> and <em>show running-config | sec ^vlan configuration .+</em> executed on device. For state <em>parsed</em> active connection to remote host is not required.</div> |
| 322 |
</td> |
| 323 |
</tr> |
| 324 |
</table> |
| 325 |
<br/> |
| 326 |
|
| 327 |
|
| 328 |
Notes |
| 329 |
----- |
| 330 |
|
| 331 |
.. note:: |
| 332 |
- Tested against Cisco IOS-XE device with Version 17.13.01 on Cat9k on CML. |
| 333 |
- Starting from v2.5.0, this module will fail when run against Cisco IOS devices that do not support VLANs. The offline states (``rendered`` and ``parsed``) will work as expected. |
| 334 |
- This module works with connection ``network_cli``. See https://docs.ansible.com/ansible/latest/network/user_guide/platform_ios.html |
| 335 |
|
| 336 |
|
| 337 |
|
| 338 |
Examples |
| 339 |
-------- |
| 340 |
|
| 341 |
.. code-block:: yaml |
| 342 |
|
| 343 |
# Using merged |
| 344 |
|
| 345 |
# Before state: |
| 346 |
# ------------- |
| 347 |
# |
| 348 |
# vios_l2#show vlan |
| 349 |
# VLAN Name Status Ports |
| 350 |
# ---- -------------------------------- --------- ------------------------------- |
| 351 |
# 1 default active Gi0/1, Gi0/2 |
| 352 |
# 1002 fddi-default act/unsup |
| 353 |
# 1003 token-ring-default act/unsup |
| 354 |
# 1004 fddinet-default act/unsup |
| 355 |
# 1005 trnet-default act/unsup |
| 356 |
# |
| 357 |
# VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 |
| 358 |
# ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ |
| 359 |
# 1 enet 100001 1500 - - - - - 0 0 |
| 360 |
# 1002 fddi 101002 1500 - - - - - 0 0 |
| 361 |
# 1003 tr 101003 1500 - - - - - 0 0 |
| 362 |
# 1004 fdnet 101004 1500 - - - ieee - 0 0 |
| 363 |
# 1005 trnet 101005 1500 - - - ibm - 0 0 |
| 364 |
|
| 365 |
- name: Merge provided configuration with device configuration |
| 366 |
cisco.ios.ios_vlans: |
| 367 |
config: |
| 368 |
- name: Vlan_10 |
| 369 |
vlan_id: 10 |
| 370 |
state: active |
| 371 |
shutdown: disabled |
| 372 |
remote_span: true |
| 373 |
- name: Vlan_20 |
| 374 |
vlan_id: 20 |
| 375 |
mtu: 610 |
| 376 |
state: active |
| 377 |
shutdown: enabled |
| 378 |
- name: Vlan_30 |
| 379 |
vlan_id: 30 |
| 380 |
state: suspend |
| 381 |
shutdown: enabled |
| 382 |
state: merged |
| 383 |
|
| 384 |
# After state: |
| 385 |
# ------------ |
| 386 |
# |
| 387 |
# vios_l2#show vlan |
| 388 |
# VLAN Name Status Ports |
| 389 |
# ---- -------------------------------- --------- ------------------------------- |
| 390 |
# 1 default active Gi0/1, Gi0/2 |
| 391 |
# 10 vlan_10 active |
| 392 |
# 20 vlan_20 act/lshut |
| 393 |
# 30 vlan_30 sus/lshut |
| 394 |
# 1002 fddi-default act/unsup |
| 395 |
# 1003 token-ring-default act/unsup |
| 396 |
# 1004 fddinet-default act/unsup |
| 397 |
# 1005 trnet-default act/unsup |
| 398 |
# |
| 399 |
# VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 |
| 400 |
# ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ |
| 401 |
# 1 enet 100001 1500 - - - - - 0 0 |
| 402 |
# 10 enet 100010 1500 - - - - - 0 0 |
| 403 |
# 20 enet 100020 610 - - - - - 0 0 |
| 404 |
# 30 enet 100030 1500 - - - - - 0 0 |
| 405 |
# 1002 fddi 101002 1500 - - - - - 0 0 |
| 406 |
# 1003 tr 101003 1500 - - - - - 0 0 |
| 407 |
# 1004 fdnet 101004 1500 - - - ieee - 0 0 |
| 408 |
# 1005 trnet 101005 1500 - - - ibm - 0 0 |
| 409 |
# |
| 410 |
# Remote SPAN VLANs |
| 411 |
# ------------------------------------------------------------------------------ |
| 412 |
# 10 |
| 413 |
|
| 414 |
# Using merged |
| 415 |
|
| 416 |
# Before state: |
| 417 |
# ------------- |
| 418 |
# |
| 419 |
# Leaf-01#show run nve | sec ^vlan configuration |
| 420 |
# vlan configuration 101 |
| 421 |
# member evpn-instance 101 vni 10101 |
| 422 |
# vlan configuration 201 |
| 423 |
# member evpn-instance 201 vni 10201 |
| 424 |
|
| 425 |
|
| 426 |
- name: Merge provided configuration with device configuration |
| 427 |
cisco.ios.ios_vlans: |
| 428 |
config: |
| 429 |
- vlan_id: 102 |
| 430 |
member: |
| 431 |
vni: 10102 |
| 432 |
evi: 102 |
| 433 |
- vlan_id: 901 |
| 434 |
member: |
| 435 |
vni: 50901 |
| 436 |
state: merged |
| 437 |
|
| 438 |
# After state: |
| 439 |
# ------------ |
| 440 |
# |
| 441 |
# Leaf-01#show run nve | sec ^vlan configuration |
| 442 |
# vlan configuration 101 |
| 443 |
# member evpn-instance 101 vni 10101 |
| 444 |
# vlan configuration 102 |
| 445 |
# member evpn-instance 102 vni 10102 |
| 446 |
# vlan configuration 201 |
| 447 |
# member evpn-instance 201 vni 10201 |
| 448 |
# vlan configuration 901 |
| 449 |
# member vni 50901 |
| 450 |
|
| 451 |
# Using overridden |
| 452 |
|
| 453 |
# Before state: |
| 454 |
# ------------- |
| 455 |
# |
| 456 |
# S1#show vlan |
| 457 |
|
| 458 |
# VLAN Name Status Ports |
| 459 |
# ---- -------------------------------- --------- ------------------------------- |
| 460 |
# 1 default active Gi0/0, Gi0/1, Gi0/2, Gi0/3 |
| 461 |
# 10 Vlan_10 active |
| 462 |
# 20 Vlan_20 active |
| 463 |
# 30 Vlan_30 suspended |
| 464 |
# 44 Vlan_44 suspended |
| 465 |
# 1002 fddi-default act/unsup |
| 466 |
# 1003 token-ring-default act/unsup |
| 467 |
# 1004 fddinet-default act/unsup |
| 468 |
# 1005 trnet-default act/unsup |
| 469 |
|
| 470 |
# VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 |
| 471 |
# ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ |
| 472 |
# 1 enet 100001 1500 - - - - - 0 0 |
| 473 |
# 10 enet 100010 1500 - - - - - 0 0 |
| 474 |
# 20 enet 100020 610 - - - - - 0 0 |
| 475 |
# 30 enet 100030 1500 - - - - - 0 0 |
| 476 |
# 44 enet 100044 1500 - - - - - 0 0 |
| 477 |
# 1002 fddi 101002 1500 - - - - - 0 0 |
| 478 |
# 1003 tr 101003 1500 - - - - - 0 0 |
| 479 |
# 1004 fdnet 101004 1500 - - - ieee - 0 0 |
| 480 |
# 1005 trnet 101005 1500 - - - ibm - 0 0 |
| 481 |
|
| 482 |
# Remote SPAN VLANs |
| 483 |
# ------------------------------------------------------------------------------ |
| 484 |
|
| 485 |
|
| 486 |
# Primary Secondary Type Ports |
| 487 |
# ------- --------- ----------------- ------------------------------------------ |
| 488 |
# S1# |
| 489 |
|
| 490 |
|
| 491 |
- name: Override device configuration of all VLANs with provided configuration |
| 492 |
cisco.ios.ios_vlans: |
| 493 |
config: |
| 494 |
- name: Vlan_2020 |
| 495 |
state: active |
| 496 |
vlan_id: 20 |
| 497 |
shutdown: disabled |
| 498 |
state: overridden |
| 499 |
|
| 500 |
# Task output: |
| 501 |
# ------------ |
| 502 |
|
| 503 |
# after: |
| 504 |
# - mtu: 1500 |
| 505 |
# name: default |
| 506 |
# shutdown: disabled |
| 507 |
# state: active |
| 508 |
# vlan_id: 1 |
| 509 |
# - mtu: 1500 |
| 510 |
# name: Vlan_2020 |
| 511 |
# shutdown: disabled |
| 512 |
# state: active |
| 513 |
# vlan_id: 20 |
| 514 |
# - mtu: 1500 |
| 515 |
# name: fddi-default |
| 516 |
# shutdown: enabled |
| 517 |
# state: active |
| 518 |
# vlan_id: 1002 |
| 519 |
# - mtu: 1500 |
| 520 |
# name: token-ring-default |
| 521 |
# shutdown: enabled |
| 522 |
# state: active |
| 523 |
# vlan_id: 1003 |
| 524 |
# - mtu: 1500 |
| 525 |
# name: fddinet-default |
| 526 |
# shutdown: enabled |
| 527 |
# state: active |
| 528 |
# vlan_id: 1004 |
| 529 |
# - mtu: 1500 |
| 530 |
# name: trnet-default |
| 531 |
# shutdown: enabled |
| 532 |
# state: active |
| 533 |
# vlan_id: 1005 |
| 534 |
|
| 535 |
# before: |
| 536 |
# - mtu: 1500 |
| 537 |
# name: default |
| 538 |
# shutdown: disabled |
| 539 |
# state: active |
| 540 |
# vlan_id: 1 |
| 541 |
# - mtu: 1500 |
| 542 |
# name: Vlan_10 |
| 543 |
# shutdown: disabled |
| 544 |
# state: active |
| 545 |
# vlan_id: 10 |
| 546 |
# - mtu: 610 |
| 547 |
# name: Vlan_20 |
| 548 |
# shutdown: disabled |
| 549 |
# state: active |
| 550 |
# vlan_id: 20 |
| 551 |
# - mtu: 1500 |
| 552 |
# name: Vlan_30 |
| 553 |
# shutdown: disabled |
| 554 |
# state: suspend |
| 555 |
# vlan_id: 30 |
| 556 |
# - mtu: 1500 |
| 557 |
# name: Vlan_44 |
| 558 |
# shutdown: disabled |
| 559 |
# state: suspend |
| 560 |
# vlan_id: 44 |
| 561 |
# - mtu: 1500 |
| 562 |
# name: fddi-default |
| 563 |
# shutdown: enabled |
| 564 |
# state: active |
| 565 |
# vlan_id: 1002 |
| 566 |
# - mtu: 1500 |
| 567 |
# name: token-ring-default |
| 568 |
# shutdown: enabled |
| 569 |
# state: active |
| 570 |
# vlan_id: 1003 |
| 571 |
# - mtu: 1500 |
| 572 |
# name: fddinet-default |
| 573 |
# shutdown: enabled |
| 574 |
# state: active |
| 575 |
# vlan_id: 1004 |
| 576 |
# - mtu: 1500 |
| 577 |
# name: trnet-default |
| 578 |
# shutdown: enabled |
| 579 |
# state: active |
| 580 |
# vlan_id: 1005 |
| 581 |
|
| 582 |
# commands: |
| 583 |
# - no vlan 1 |
| 584 |
# - no vlan 10 |
| 585 |
# - no vlan 30 |
| 586 |
# - no vlan 44 |
| 587 |
# - no vlan 1002 |
| 588 |
# - no vlan 1003 |
| 589 |
# - no vlan 1004 |
| 590 |
# - no vlan 1005 |
| 591 |
# - vlan 20 |
| 592 |
# - name Vlan_2020 |
| 593 |
# - no mtu 610 |
| 594 |
# - no vlan configuration 1 |
| 595 |
# - no vlan configuration 10 |
| 596 |
# - no vlan configuration 30 |
| 597 |
# - no vlan configuration 44 |
| 598 |
# - no vlan configuration 1002 |
| 599 |
# - no vlan configuration 1003 |
| 600 |
# - no vlan configuration 1004 |
| 601 |
# - no vlan configuration 1005 |
| 602 |
|
| 603 |
# After state: |
| 604 |
# ------------ |
| 605 |
# |
| 606 |
# vios_l2#show vlan |
| 607 |
# VLAN Name Status Ports |
| 608 |
# ---- -------------------------------- --------- ------------------------------- |
| 609 |
# 1 default active Gi0/0, Gi0/1, Gi0/2, Gi0/3 |
| 610 |
# 20 Vlan_2020 active |
| 611 |
# 1002 fddi-default act/unsup |
| 612 |
# 1003 token-ring-default act/unsup |
| 613 |
# 1004 fddinet-default act/unsup |
| 614 |
# 1005 trnet-default act/unsup |
| 615 |
|
| 616 |
# VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 |
| 617 |
# ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ |
| 618 |
# 1 enet 100001 1500 - - - - - 0 0 |
| 619 |
# 20 enet 100020 1500 - - - - - 0 0 |
| 620 |
# 1002 fddi 101002 1500 - - - - - 0 0 |
| 621 |
# 1003 tr 101003 1500 - - - - - 0 0 |
| 622 |
# 1004 fdnet 101004 1500 - - - ieee - 0 0 |
| 623 |
# 1005 trnet 101005 1500 - - - ibm - 0 0 |
| 624 |
|
| 625 |
# Remote SPAN VLANs |
| 626 |
# ------------------------------------------------------------------------------ |
| 627 |
|
| 628 |
|
| 629 |
# Primary Secondary Type Ports |
| 630 |
# ------- --------- ----------------- ------------------------------------------ |
| 631 |
|
| 632 |
# Using purged |
| 633 |
|
| 634 |
# Before state: |
| 635 |
# ------------- |
| 636 |
# |
| 637 |
# S1#show vlan |
| 638 |
|
| 639 |
# VLAN Name Status Ports |
| 640 |
# ---- -------------------------------- --------- ------------------------------- |
| 641 |
# 1 default active Gi0/0, Gi0/1, Gi0/2, Gi0/3 |
| 642 |
# 20 Vlan_2020 active |
| 643 |
# 1002 fddi-default act/unsup |
| 644 |
# 1003 token-ring-default act/unsup |
| 645 |
# 1004 fddinet-default act/unsup |
| 646 |
# 1005 trnet-default act/unsup |
| 647 |
|
| 648 |
# VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 |
| 649 |
# ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ |
| 650 |
# 1 enet 100001 1500 - - - - - 0 0 |
| 651 |
# 20 enet 100020 1500 - - - - - 0 0 |
| 652 |
# 1002 fddi 101002 1500 - - - - - 0 0 |
| 653 |
# 1003 tr 101003 1500 - - - - - 0 0 |
| 654 |
# 1004 fdnet 101004 1500 - - - ieee - 0 0 |
| 655 |
# 1005 trnet 101005 1500 - - - ibm - 0 0 |
| 656 |
|
| 657 |
# Remote SPAN VLANs |
| 658 |
# ------------------------------------------------------------------------------ |
| 659 |
|
| 660 |
|
| 661 |
# Primary Secondary Type Ports |
| 662 |
# ------- --------- ----------------- ------------------------------------------ |
| 663 |
|
| 664 |
# S1#show running-config | section ^vlan configuration .+ |
| 665 |
# vlan configuration 20 |
| 666 |
|
| 667 |
|
| 668 |
- name: Purge all vlans configuration |
| 669 |
cisco.ios.ios_vlans: |
| 670 |
config: |
| 671 |
state: purged |
| 672 |
|
| 673 |
# Task output: |
| 674 |
# ------------ |
| 675 |
|
| 676 |
# after: |
| 677 |
# - mtu: 1500 |
| 678 |
# name: default |
| 679 |
# shutdown: disabled |
| 680 |
# state: active |
| 681 |
# vlan_id: 1 |
| 682 |
# - mtu: 1500 |
| 683 |
# name: fddi-default |
| 684 |
# shutdown: enabled |
| 685 |
# state: active |
| 686 |
# vlan_id: 1002 |
| 687 |
# - mtu: 1500 |
| 688 |
# name: token-ring-default |
| 689 |
# shutdown: enabled |
| 690 |
# state: active |
| 691 |
# vlan_id: 1003 |
| 692 |
# - mtu: 1500 |
| 693 |
# name: fddinet-default |
| 694 |
# shutdown: enabled |
| 695 |
# state: active |
| 696 |
# vlan_id: 1004 |
| 697 |
# - mtu: 1500 |
| 698 |
# name: trnet-default |
| 699 |
# shutdown: enabled |
| 700 |
# state: active |
| 701 |
# vlan_id: 1005 |
| 702 |
|
| 703 |
# before: |
| 704 |
# - mtu: 1500 |
| 705 |
# name: default |
| 706 |
# shutdown: disabled |
| 707 |
# state: active |
| 708 |
# vlan_id: 1 |
| 709 |
# - mtu: 1500 |
| 710 |
# name: Vlan_2020 |
| 711 |
# shutdown: disabled |
| 712 |
# state: active |
| 713 |
# vlan_id: 20 |
| 714 |
# - mtu: 1500 |
| 715 |
# name: fddi-default |
| 716 |
# shutdown: enabled |
| 717 |
# state: active |
| 718 |
# vlan_id: 1002 |
| 719 |
# - mtu: 1500 |
| 720 |
# name: token-ring-default |
| 721 |
# shutdown: enabled |
| 722 |
# state: active |
| 723 |
# vlan_id: 1003 |
| 724 |
# - mtu: 1500 |
| 725 |
# name: fddinet-default |
| 726 |
# shutdown: enabled |
| 727 |
# state: active |
| 728 |
# vlan_id: 1004 |
| 729 |
# - mtu: 1500 |
| 730 |
# name: trnet-default |
| 731 |
# shutdown: enabled |
| 732 |
# state: active |
| 733 |
# vlan_id: 1005 |
| 734 |
|
| 735 |
# commands: |
| 736 |
# - no vlan 1 |
| 737 |
# - no vlan 20 |
| 738 |
# - no vlan 1002 |
| 739 |
# - no vlan 1003 |
| 740 |
# - no vlan 1004 |
| 741 |
# - no vlan 1005 |
| 742 |
# - no vlan configuration 1 |
| 743 |
# - no vlan configuration 20 |
| 744 |
# - no vlan configuration 1002 |
| 745 |
# - no vlan configuration 1003 |
| 746 |
# - no vlan configuration 1004 |
| 747 |
# - no vlan configuration 1005 |
| 748 |
|
| 749 |
# After state: |
| 750 |
# ------------ |
| 751 |
# |
| 752 |
# S1#show vlan |
| 753 |
|
| 754 |
# VLAN Name Status Ports |
| 755 |
# ---- -------------------------------- --------- ------------------------------- |
| 756 |
# 1 default active Gi0/0, Gi0/1, Gi0/2, Gi0/3 |
| 757 |
# 1002 fddi-default act/unsup |
| 758 |
# 1003 token-ring-default act/unsup |
| 759 |
# 1004 fddinet-default act/unsup |
| 760 |
# 1005 trnet-default act/unsup |
| 761 |
|
| 762 |
# VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 |
| 763 |
# ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ |
| 764 |
# 1 enet 100001 1500 - - - - - 0 0 |
| 765 |
# 1002 fddi 101002 1500 - - - - - 0 0 |
| 766 |
# 1003 tr 101003 1500 - - - - - 0 0 |
| 767 |
# 1004 fdnet 101004 1500 - - - ieee - 0 0 |
| 768 |
# 1005 trnet 101005 1500 - - - ibm - 0 0 |
| 769 |
|
| 770 |
# Remote SPAN VLANs |
| 771 |
# ------------------------------------------------------------------------------ |
| 772 |
|
| 773 |
|
| 774 |
# Primary Secondary Type Ports |
| 775 |
# ------- --------- ----------------- ------------------------------------------ |
| 776 |
|
| 777 |
# S1#show running-config | section ^vlan configuration .+ |
| 778 |
# S1# |
| 779 |
|
| 780 |
|
| 781 |
# Using replaced |
| 782 |
|
| 783 |
# Before state: |
| 784 |
# ------------- |
| 785 |
# |
| 786 |
# vios_l2#show vlan |
| 787 |
# VLAN Name Status Ports |
| 788 |
# ---- -------------------------------- --------- ------------------------------- |
| 789 |
# 1 default active Gi0/1, Gi0/2 |
| 790 |
# 10 vlan_10 active |
| 791 |
# 20 vlan_20 act/lshut |
| 792 |
# 30 vlan_30 sus/lshut |
| 793 |
# 1002 fddi-default act/unsup |
| 794 |
# 1003 token-ring-default act/unsup |
| 795 |
# 1004 fddinet-default act/unsup |
| 796 |
# 1005 trnet-default act/unsup |
| 797 |
# |
| 798 |
# VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 |
| 799 |
# ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ |
| 800 |
# 1 enet 100001 1500 - - - - - 0 0 |
| 801 |
# 10 enet 100010 1500 - - - - - 0 0 |
| 802 |
# 20 enet 100020 610 - - - - - 0 0 |
| 803 |
# 30 enet 100030 1500 - - - - - 0 0 |
| 804 |
# 1002 fddi 101002 1500 - - - - - 0 0 |
| 805 |
# 1003 tr 101003 1500 - - - - - 0 0 |
| 806 |
# 1004 fdnet 101004 1500 - - - ieee - 0 0 |
| 807 |
# 1005 trnet 101005 1500 - - - ibm - 0 0 |
| 808 |
# |
| 809 |
# Remote SPAN VLANs |
| 810 |
# ------------------------------------------------------------------------------ |
| 811 |
# 10 |
| 812 |
|
| 813 |
- name: Replaces device configuration of listed VLANs with provided configuration |
| 814 |
cisco.ios.ios_vlans: |
| 815 |
config: |
| 816 |
- vlan_id: 20 |
| 817 |
name: Test_VLAN20 |
| 818 |
mtu: 700 |
| 819 |
shutdown: disabled |
| 820 |
- vlan_id: 50 |
| 821 |
name: pvlan-isolated |
| 822 |
private_vlan: |
| 823 |
type: isolated |
| 824 |
- vlan_id: 60 |
| 825 |
name: pvlan-community |
| 826 |
private_vlan: |
| 827 |
type: community |
| 828 |
- vlan_id: 70 |
| 829 |
name: pvlan-primary |
| 830 |
private_vlan: |
| 831 |
type: primary |
| 832 |
associated: |
| 833 |
- 50 |
| 834 |
- 60 |
| 835 |
|
| 836 |
state: replaced |
| 837 |
|
| 838 |
# After state: |
| 839 |
# ------------ |
| 840 |
# |
| 841 |
# vios_l2#sh vlan |
| 842 |
# VLAN Name Status Ports |
| 843 |
# ---- -------------------------------- --------- ------------------------------- |
| 844 |
# 1 default active Gi0/0, Gi0/1, Gi0/2, Gi0/3 |
| 845 |
# 10 Vlan_10 active |
| 846 |
# 20 Test_VLAN20 active |
| 847 |
# 50 pvlan-isolated active |
| 848 |
# 60 pvlan-community active |
| 849 |
# 70 pvlan-primary active |
| 850 |
# 1002 fddi-default act/unsup |
| 851 |
# 1003 token-ring-default act/unsup |
| 852 |
# 1004 fddinet-default act/unsup |
| 853 |
# 1005 trnet-default act/unsup |
| 854 |
# |
| 855 |
# VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 |
| 856 |
# ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ |
| 857 |
# 1 enet 100001 1500 - - - - - 0 0 |
| 858 |
# 10 enet 100010 1000 - - - - - 0 0 |
| 859 |
# 20 enet 100020 700 - - - - - 0 0 |
| 860 |
# 50 enet 100050 1500 - - - - - 0 0 |
| 861 |
# 60 enet 100051 1500 - - - - - 0 0 |
| 862 |
# 70 enet 100059 1500 - - - - - 0 0 |
| 863 |
# 1002 fddi 101002 1500 - - - - - 0 0 |
| 864 |
# 1003 tr 101003 1500 - - - - - 0 0 |
| 865 |
# 1004 fdnet 101004 1500 - - - ieee - 0 0 |
| 866 |
# |
| 867 |
# VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 |
| 868 |
# ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ |
| 869 |
# 1005 trnet 101005 1500 - - - ibm - 0 0 |
| 870 |
# |
| 871 |
# Remote SPAN VLANs |
| 872 |
# ------------------------------------------------------------------------------ |
| 873 |
# |
| 874 |
# |
| 875 |
# Primary Secondary Type Ports |
| 876 |
# ------- --------- ----------------- ------------------------------------------ |
| 877 |
# 70 50 isolated |
| 878 |
# 70 60 community |
| 879 |
|
| 880 |
# Using deleted |
| 881 |
|
| 882 |
# Before state: |
| 883 |
# ------------- |
| 884 |
# |
| 885 |
# vios_l2#show vlan |
| 886 |
# VLAN Name Status Ports |
| 887 |
# ---- -------------------------------- --------- ------------------------------- |
| 888 |
# 1 default active Gi0/1, Gi0/2 |
| 889 |
# 10 vlan_10 active |
| 890 |
# 20 vlan_20 act/lshut |
| 891 |
# 30 vlan_30 sus/lshut |
| 892 |
# 1002 fddi-default act/unsup |
| 893 |
# 1003 token-ring-default act/unsup |
| 894 |
# 1004 fddinet-default act/unsup |
| 895 |
# 1005 trnet-default act/unsup |
| 896 |
# |
| 897 |
# VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 |
| 898 |
# ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ |
| 899 |
# 1 enet 100001 1500 - - - - - 0 0 |
| 900 |
# 10 enet 100010 1500 - - - - - 0 0 |
| 901 |
# 20 enet 100020 610 - - - - - 0 0 |
| 902 |
# 30 enet 100030 1500 - - - - - 0 0 |
| 903 |
# 1002 fddi 101002 1500 - - - - - 0 0 |
| 904 |
# 1003 tr 101003 1500 - - - - - 0 0 |
| 905 |
# 1004 fdnet 101004 1500 - - - ieee - 0 0 |
| 906 |
# 1005 trnet 101005 1500 - - - ibm - 0 0 |
| 907 |
# |
| 908 |
# Remote SPAN VLANs |
| 909 |
# ------------------------------------------------------------------------------ |
| 910 |
# 10 |
| 911 |
|
| 912 |
- name: Delete attributes of given VLANs |
| 913 |
cisco.ios.ios_vlans: |
| 914 |
config: |
| 915 |
- vlan_id: 10 |
| 916 |
- vlan_id: 20 |
| 917 |
state: deleted |
| 918 |
|
| 919 |
# After state: |
| 920 |
# ------------- |
| 921 |
# |
| 922 |
# vios_l2#show vlan |
| 923 |
# VLAN Name Status Ports |
| 924 |
# ---- -------------------------------- --------- ------------------------------- |
| 925 |
# 1 default active Gi0/1, Gi0/2 |
| 926 |
# 30 vlan_30 sus/lshut |
| 927 |
# 1002 fddi-default act/unsup |
| 928 |
# 1003 token-ring-default act/unsup |
| 929 |
# 1004 fddinet-default act/unsup |
| 930 |
# 1005 trnet-default act/unsup |
| 931 |
# |
| 932 |
# VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 |
| 933 |
# ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ |
| 934 |
# 1 enet 100001 1500 - - - - - 0 0 |
| 935 |
# 30 enet 100030 1500 - - - - - 0 0 |
| 936 |
# 1002 fddi 101002 1500 - - - - - 0 0 |
| 937 |
# 1003 tr 101003 1500 - - - - - 0 0 |
| 938 |
# 1004 fdnet 101004 1500 - - - ieee - 0 0 |
| 939 |
# 1005 trnet 101005 1500 - - - ibm - 0 0 |
| 940 |
|
| 941 |
# Using deleted |
| 942 |
|
| 943 |
# Before state: |
| 944 |
# ------------- |
| 945 |
# |
| 946 |
# Leaf-01#show run nve | sec ^vlan configuration |
| 947 |
# vlan configuration 101 |
| 948 |
# member evpn-instance 101 vni 10101 |
| 949 |
# vlan configuration 102 |
| 950 |
# member evpn-instance 102 vni 10102 |
| 951 |
# vlan configuration 201 |
| 952 |
# member evpn-instance 201 vni 10201 |
| 953 |
# vlan configuration 901 |
| 954 |
# member vni 50901 |
| 955 |
|
| 956 |
- name: Delete attributes of given VLANs |
| 957 |
cisco.ios.ios_vlans: |
| 958 |
config: |
| 959 |
- vlan_id: 101 |
| 960 |
state: deleted |
| 961 |
|
| 962 |
# After state: |
| 963 |
# ------------- |
| 964 |
# |
| 965 |
# Leaf-01#show run nve | sec ^vlan configuration |
| 966 |
# vlan configuration 101 |
| 967 |
# vlan configuration 102 |
| 968 |
# member evpn-instance 102 vni 10102 |
| 969 |
# vlan configuration 201 |
| 970 |
# member evpn-instance 201 vni 10201 |
| 971 |
# vlan configuration 901 |
| 972 |
# member vni 50901 |
| 973 |
|
| 974 |
# Using Deleted without any config passed |
| 975 |
# "(NOTE: This will delete all of configured vlans attributes)" |
| 976 |
|
| 977 |
# Before state: |
| 978 |
# ------------- |
| 979 |
# |
| 980 |
# vios_l2#show vlan |
| 981 |
# VLAN Name Status Ports |
| 982 |
# ---- -------------------------------- --------- ------------------------------- |
| 983 |
# 1 default active Gi0/1, Gi0/2 |
| 984 |
# 10 vlan_10 active |
| 985 |
# 20 vlan_20 act/lshut |
| 986 |
# 30 vlan_30 sus/lshut |
| 987 |
# 1002 fddi-default act/unsup |
| 988 |
# 1003 token-ring-default act/unsup |
| 989 |
# 1004 fddinet-default act/unsup |
| 990 |
# 1005 trnet-default act/unsup |
| 991 |
# |
| 992 |
# VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 |
| 993 |
# ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ |
| 994 |
# 1 enet 100001 1500 - - - - - 0 0 |
| 995 |
# 10 enet 100010 1500 - - - - - 0 0 |
| 996 |
# 20 enet 100020 610 - - - - - 0 0 |
| 997 |
# 30 enet 100030 1500 - - - - - 0 0 |
| 998 |
# 1002 fddi 101002 1500 - - - - - 0 0 |
| 999 |
# 1003 tr 101003 1500 - - - - - 0 0 |
| 1000 |
# 1004 fdnet 101004 1500 - - - ieee - 0 0 |
| 1001 |
# 1005 trnet 101005 1500 - - - ibm - 0 0 |
| 1002 |
# |
| 1003 |
# Remote SPAN VLANs |
| 1004 |
# ------------------------------------------------------------------------------ |
| 1005 |
# 10 |
| 1006 |
|
| 1007 |
- name: Delete attributes of ALL VLANs |
| 1008 |
cisco.ios.ios_vlans: |
| 1009 |
state: deleted |
| 1010 |
|
| 1011 |
# After state: |
| 1012 |
# ------------- |
| 1013 |
# |
| 1014 |
# vios_l2#show vlan |
| 1015 |
# VLAN Name Status Ports |
| 1016 |
# ---- -------------------------------- --------- ------------------------------- |
| 1017 |
# 1 default active Gi0/1, Gi0/2 |
| 1018 |
# 1002 fddi-default act/unsup |
| 1019 |
# 1003 token-ring-default act/unsup |
| 1020 |
# 1004 fddinet-default act/unsup |
| 1021 |
# 1005 trnet-default act/unsup |
| 1022 |
# |
| 1023 |
# VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 |
| 1024 |
# ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ |
| 1025 |
# 1 enet 100001 1500 - - - - - 0 0 |
| 1026 |
# 1002 fddi 101002 1500 - - - - - 0 0 |
| 1027 |
# 1003 tr 101003 1500 - - - - - 0 0 |
| 1028 |
# 1004 fdnet 101004 1500 - - - ieee - 0 0 |
| 1029 |
# 1005 trnet 101005 1500 - - - ibm - 0 0 |
| 1030 |
|
| 1031 |
# Using Deleted without any config passed |
| 1032 |
# "(NOTE: This will delete all of configured vlans attributes)" |
| 1033 |
|
| 1034 |
# Before state: |
| 1035 |
# ------------- |
| 1036 |
# |
| 1037 |
# Leaf-01#show run nve | sec ^vlan configuration |
| 1038 |
# vlan configuration 101 |
| 1039 |
# member evpn-instance 101 vni 10101 |
| 1040 |
# vlan configuration 102 |
| 1041 |
# member evpn-instance 102 vni 10102 |
| 1042 |
# vlan configuration 201 |
| 1043 |
# member evpn-instance 201 vni 10201 |
| 1044 |
# vlan configuration 202 |
| 1045 |
# member evpn-instance 202 vni 10202 |
| 1046 |
# vlan configuration 901 |
| 1047 |
# member vni 50901 |
| 1048 |
|
| 1049 |
- name: Delete attributes of ALL VLANs |
| 1050 |
cisco.ios.ios_vlans: |
| 1051 |
state: deleted |
| 1052 |
|
| 1053 |
# After state: |
| 1054 |
# ------------- |
| 1055 |
# |
| 1056 |
# Leaf-01#show run nve | sec ^vlan configuration |
| 1057 |
# no vlan configuration 101 |
| 1058 |
# no vlan configuration 102 |
| 1059 |
# no vlan configuration 201 |
| 1060 |
# no vlan configuration 202 |
| 1061 |
# no vlan configuration 901 |
| 1062 |
# no vlan configuration 902 |
| 1063 |
|
| 1064 |
# Using gathered, vlan configuration only |
| 1065 |
|
| 1066 |
# Before state: |
| 1067 |
# ------------- |
| 1068 |
# |
| 1069 |
# Leaf-01#show run nve | sec ^vlan configuration |
| 1070 |
# vlan configuration 101 |
| 1071 |
# member evpn-instance 101 vni 10101 |
| 1072 |
# vlan configuration 102 |
| 1073 |
# member evpn-instance 102 vni 10102 |
| 1074 |
# vlan configuration 201 |
| 1075 |
# member evpn-instance 201 vni 10201 |
| 1076 |
# vlan configuration 202 |
| 1077 |
# member evpn-instance 202 vni 10202 |
| 1078 |
# vlan configuration 901 |
| 1079 |
# member vni 50901 |
| 1080 |
|
| 1081 |
- name: Gather listed vlans with provided configurations |
| 1082 |
cisco.ios.ios_vlans: |
| 1083 |
state: gathered |
| 1084 |
|
| 1085 |
# Module Execution Result: |
| 1086 |
# ------------------------ |
| 1087 |
# |
| 1088 |
# gathered = [ |
| 1089 |
# { |
| 1090 |
# "member": { |
| 1091 |
# "evi": 101, |
| 1092 |
# "vni": 10101 |
| 1093 |
# }, |
| 1094 |
# "vlan_id": 101 |
| 1095 |
# }, |
| 1096 |
# { |
| 1097 |
# "member": { |
| 1098 |
# "evi": 102, |
| 1099 |
# "vni": 10102 |
| 1100 |
# }, |
| 1101 |
# "vlan_id": 102 |
| 1102 |
# }, |
| 1103 |
# { |
| 1104 |
# "member": { |
| 1105 |
# "evi": 201, |
| 1106 |
# "vni": 10201 |
| 1107 |
# }, |
| 1108 |
# "vlan_id": 201 |
| 1109 |
# }, |
| 1110 |
# { |
| 1111 |
# "member": { |
| 1112 |
# "evi": 202, |
| 1113 |
# "vni": 10202 |
| 1114 |
# }, |
| 1115 |
# "vlan_id": 202 |
| 1116 |
# }, |
| 1117 |
# { |
| 1118 |
# "member": { |
| 1119 |
# "vni": 50901 |
| 1120 |
# }, |
| 1121 |
# "vlan_id": 901 |
| 1122 |
# }, |
| 1123 |
# { |
| 1124 |
# "member": { |
| 1125 |
# "vni": 50902 |
| 1126 |
# }, |
| 1127 |
# "vlan_id": 902 |
| 1128 |
# } |
| 1129 |
# ] |
| 1130 |
|
| 1131 |
# Using Rendered |
| 1132 |
|
| 1133 |
- name: Render the commands for provided configuration |
| 1134 |
cisco.ios.ios_vlans: |
| 1135 |
config: |
| 1136 |
- name: Vlan_10 |
| 1137 |
vlan_id: 10 |
| 1138 |
state: active |
| 1139 |
shutdown: disabled |
| 1140 |
remote_span: true |
| 1141 |
- name: Vlan_20 |
| 1142 |
vlan_id: 20 |
| 1143 |
mtu: 610 |
| 1144 |
state: active |
| 1145 |
shutdown: enabled |
| 1146 |
- name: Vlan_30 |
| 1147 |
vlan_id: 30 |
| 1148 |
state: suspend |
| 1149 |
shutdown: enabled |
| 1150 |
state: rendered |
| 1151 |
|
| 1152 |
# Module Execution Result: |
| 1153 |
# ------------------------ |
| 1154 |
# |
| 1155 |
# "rendered": [ |
| 1156 |
# "vlan 10", |
| 1157 |
# "name Vlan_10", |
| 1158 |
# "state active", |
| 1159 |
# "remote-span", |
| 1160 |
# "no shutdown", |
| 1161 |
# "vlan 20", |
| 1162 |
# "name Vlan_20", |
| 1163 |
# "state active", |
| 1164 |
# "mtu 610", |
| 1165 |
# "shutdown", |
| 1166 |
# "vlan 30", |
| 1167 |
# "name Vlan_30", |
| 1168 |
# "state suspend", |
| 1169 |
# "shutdown" |
| 1170 |
# ] |
| 1171 |
|
| 1172 |
# Using Rendered |
| 1173 |
|
| 1174 |
- name: Render the commands for provided configuration |
| 1175 |
cisco.ios.ios_vlans: |
| 1176 |
config: |
| 1177 |
- vlan_id: 101 |
| 1178 |
member: |
| 1179 |
vni: 10101 |
| 1180 |
evi: 101 |
| 1181 |
- vlan_id: 102 |
| 1182 |
member: |
| 1183 |
vni: 10102 |
| 1184 |
evi: 102 |
| 1185 |
state: rendered |
| 1186 |
|
| 1187 |
# Module Execution Result: |
| 1188 |
# ------------------------ |
| 1189 |
# |
| 1190 |
# "rendered": [ |
| 1191 |
# "vlan configuration 101", |
| 1192 |
# "member evpn-instance 101 vni 10101", |
| 1193 |
# "vlan configuration 102", |
| 1194 |
# "member evpn-instance 102 vni 10102" |
| 1195 |
# ] |
| 1196 |
|
| 1197 |
# Using Parsed |
| 1198 |
|
| 1199 |
# File: parsed.cfg |
| 1200 |
# ---------------- |
| 1201 |
# |
| 1202 |
# VLAN Name Status Ports |
| 1203 |
# ---- -------------------------------- --------- ------------------------------- |
| 1204 |
# 1 default active Gi0/1, Gi0/2 |
| 1205 |
# 10 vlan_10 active |
| 1206 |
# 20 vlan_20 act/lshut |
| 1207 |
# 30 vlan_30 sus/lshut |
| 1208 |
# 1002 fddi-default act/unsup |
| 1209 |
# 1003 token-ring-default act/unsup |
| 1210 |
# 1004 fddinet-default act/unsup |
| 1211 |
# 1005 trnet-default act/unsup |
| 1212 |
# |
| 1213 |
# VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 |
| 1214 |
# ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ |
| 1215 |
# 1 enet 100001 1500 - - - - - 0 0 |
| 1216 |
# 10 enet 100010 1500 - - - - - 0 0 |
| 1217 |
# 20 enet 100020 1500 - - - - - 0 0 |
| 1218 |
# 30 enet 100030 1500 - - - - - 0 0 |
| 1219 |
# 1002 fddi 101002 1500 - - - - - 0 0 |
| 1220 |
# 1003 tr 101003 1500 - - - - - 0 0 |
| 1221 |
# 1004 fdnet 101004 1500 - - - ieee - 0 0 |
| 1222 |
# 1005 trnet 101005 1500 - - - ibm - 0 0 |
| 1223 |
|
| 1224 |
- name: Parse the commands for provided configuration |
| 1225 |
cisco.ios.ios_vlans: |
| 1226 |
running_config: "{{ lookup('file', './parsed.cfg') }}" |
| 1227 |
state: parsed |
| 1228 |
|
| 1229 |
# Module Execution Result: |
| 1230 |
# ------------------------ |
| 1231 |
# |
| 1232 |
# "parsed": [ |
| 1233 |
# { |
| 1234 |
# "mtu": 1500, |
| 1235 |
# "name": "default", |
| 1236 |
# "shutdown": "disabled", |
| 1237 |
# "state": "active", |
| 1238 |
# "vlan_id": 1 |
| 1239 |
# }, |
| 1240 |
# { |
| 1241 |
# "mtu": 1500, |
| 1242 |
# "name": "vlan_10", |
| 1243 |
# "shutdown": "disabled", |
| 1244 |
# "state": "active", |
| 1245 |
# "vlan_id": 10 |
| 1246 |
# }, |
| 1247 |
# { |
| 1248 |
# "mtu": 1500, |
| 1249 |
# "name": "vlan_20", |
| 1250 |
# "shutdown": "enabled", |
| 1251 |
# "state": "active", |
| 1252 |
# "vlan_id": 20 |
| 1253 |
# }, |
| 1254 |
# { |
| 1255 |
# "mtu": 1500, |
| 1256 |
# "name": "vlan_30", |
| 1257 |
# "shutdown": "enabled", |
| 1258 |
# "state": "suspend", |
| 1259 |
# "vlan_id": 30 |
| 1260 |
# }, |
| 1261 |
# { |
| 1262 |
# "mtu": 1500, |
| 1263 |
# "name": "fddi-default", |
| 1264 |
# "shutdown": "enabled", |
| 1265 |
# "state": "active", |
| 1266 |
# "vlan_id": 1002 |
| 1267 |
# }, |
| 1268 |
# { |
| 1269 |
# "mtu": 1500, |
| 1270 |
# "name": "token-ring-default", |
| 1271 |
# "shutdown": "enabled", |
| 1272 |
# "state": "active", |
| 1273 |
# "vlan_id": 1003 |
| 1274 |
# }, |
| 1275 |
# { |
| 1276 |
# "mtu": 1500, |
| 1277 |
# "name": "fddinet-default", |
| 1278 |
# "shutdown": "enabled", |
| 1279 |
# "state": "active", |
| 1280 |
# "vlan_id": 1004 |
| 1281 |
# }, |
| 1282 |
# { |
| 1283 |
# "mtu": 1500, |
| 1284 |
# "name": "trnet-default", |
| 1285 |
# "shutdown": "enabled", |
| 1286 |
# "state": "active", |
| 1287 |
# "vlan_id": 1005 |
| 1288 |
# } |
| 1289 |
# ] |
| 1290 |
|
| 1291 |
# Using Parsed Vlan configuration only |
| 1292 |
|
| 1293 |
# File: parsed.cfg |
| 1294 |
# ---------------- |
| 1295 |
# |
| 1296 |
# vlan configuration 101 |
| 1297 |
# member evpn-instance 101 vni 10101 |
| 1298 |
# vlan configuration 102 |
| 1299 |
# member evpn-instance 102 vni 10102 |
| 1300 |
# vlan configuration 901 |
| 1301 |
# member vni 50901 |
| 1302 |
|
| 1303 |
- name: Parse the commands for provided configuration |
| 1304 |
cisco.ios.ios_vlans: |
| 1305 |
running_config: "{{ lookup('file', './parsed.cfg') }}" |
| 1306 |
state: parsed |
| 1307 |
|
| 1308 |
# Module Execution Result: |
| 1309 |
# ------------------------ |
| 1310 |
# |
| 1311 |
# "parsed": [ |
| 1312 |
# { |
| 1313 |
# "member": { |
| 1314 |
# "evi": 101, |
| 1315 |
# "vni": 10101 |
| 1316 |
# }, |
| 1317 |
# "vlan_id": 101 |
| 1318 |
# }, |
| 1319 |
# { |
| 1320 |
# "member": { |
| 1321 |
# "evi": 102, |
| 1322 |
# "vni": 10102 |
| 1323 |
# }, |
| 1324 |
# "vlan_id": 102 |
| 1325 |
# }, |
| 1326 |
# { |
| 1327 |
# "member": { |
| 1328 |
# "vni": 50901 |
| 1329 |
# }, |
| 1330 |
# "vlan_id": 901 |
| 1331 |
# } |
| 1332 |
# ] |
| 1333 |
|
| 1334 |
# Using Parsed, Vlan and vlan configuration |
| 1335 |
|
| 1336 |
# File: parsed.cfg |
| 1337 |
# ---------------- |
| 1338 |
# |
| 1339 |
# VLAN Name Status Ports |
| 1340 |
# ---- -------------------------------- --------- ------------------------------- |
| 1341 |
# 1 default active Gi0/1, Gi0/2 |
| 1342 |
# 101 RemoteIsInMyName act/unsup Fa0/1, Fa0/4, Fa0/5, Fa0/6, Fa0/7, Fa0/8, Fa0/9, Fa0/10, Fa0/11, Fa0/12 |
| 1343 |
# Fa0/13, Fa0/14, Fa0/15, Fa0/16, Fa0/17, Fa0/18, Fa0/19, Fa0/20, Fa0/21 |
| 1344 |
# Fa0/22, Fa0/23, Fa0/24, Fa0/25, Fa0/26, Fa0/27, Fa0/28, Fa0/29, Fa0/30 |
| 1345 |
# Fa0/31, Fa0/32, Fa0/33, Fa0/34, Fa0/35, Fa0/36, Fa0/37, Fa0/38, Fa0/39 |
| 1346 |
# Fa0/40, Fa0/41, Fa0/42, Fa0/43, Fa0/44, Fa0/45, Fa0/46, Fa0/47, Fa0/48 |
| 1347 |
# 150 VLAN0150 active |
| 1348 |
# 888 a_very_long_vlan_name_a_very_long_vlan_name |
| 1349 |
# active |
| 1350 |
# 1002 fddi-default act/unsup |
| 1351 |
# 1003 trcrf-default act/unsup |
| 1352 |
# 1004 fddinet-default act/unsup |
| 1353 |
# 1005 trbrf-default act/unsup |
| 1354 |
# |
| 1355 |
# VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 |
| 1356 |
# ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ |
| 1357 |
# 1 enet 100001 1500 - - - - - 0 0 |
| 1358 |
# 101 enet 100101 610 - - - - - 0 0 |
| 1359 |
# 150 enet 100150 1500 - - - - - 0 0 |
| 1360 |
# 888 enet 100888 1500 - - - - - 0 0 |
| 1361 |
# 1002 fddi 101002 1500 - - - - - 0 0 |
| 1362 |
# 1003 trcrf 101003 4472 1005 3276 - - srb 0 0 |
| 1363 |
# 1004 fdnet 101004 1500 - - - ieee - 0 0 |
| 1364 |
# 1005 trbrf 101005 4472 - - 15 ibm - 0 0 |
| 1365 |
# |
| 1366 |
# |
| 1367 |
# VLAN AREHops STEHops Backup CRF |
| 1368 |
# ---- ------- ------- ---------- |
| 1369 |
# 1003 7 7 off |
| 1370 |
# |
| 1371 |
# Remote SPAN VLANs |
| 1372 |
# ------------------------------------------------------------------------------ |
| 1373 |
# 150 |
| 1374 |
# |
| 1375 |
# Primary Secondary Type Ports |
| 1376 |
# ------- --------- ----------------- ------------------------------------------ |
| 1377 |
# |
| 1378 |
# vlan configuration 101 |
| 1379 |
# member evpn-instance 101 vni 10101 |
| 1380 |
# vlan configuration 102 |
| 1381 |
# member evpn-instance 102 vni 10102 |
| 1382 |
# vlan configuration 901 |
| 1383 |
# member vni 50901 |
| 1384 |
|
| 1385 |
- name: Parse the commands for provided configuration |
| 1386 |
cisco.ios.ios_vlans: |
| 1387 |
running_config: "{{ lookup('file', './parsed.cfg') }}" |
| 1388 |
state: parsed |
| 1389 |
|
| 1390 |
# Module Execution Result: |
| 1391 |
# ------------------------ |
| 1392 |
# |
| 1393 |
# "parsed": [ |
| 1394 |
# { |
| 1395 |
# "name": "default", |
| 1396 |
# "vlan_id": 1, |
| 1397 |
# "state": "active", |
| 1398 |
# "shutdown": "disabled", |
| 1399 |
# "mtu": 1500, |
| 1400 |
# }, |
| 1401 |
# { |
| 1402 |
# "name": "RemoteIsInMyName", |
| 1403 |
# "vlan_id": 101, |
| 1404 |
# "state": "active", |
| 1405 |
# "shutdown": "enabled", |
| 1406 |
# "mtu": 610, |
| 1407 |
# "member": {"evi": 101, "vni": 10101}, |
| 1408 |
# }, |
| 1409 |
# { |
| 1410 |
# "name": "VLAN0150", |
| 1411 |
# "vlan_id": 150, |
| 1412 |
# "state": "active", |
| 1413 |
# "shutdown": "disabled", |
| 1414 |
# "mtu": 1500, |
| 1415 |
# "remote_span": True, |
| 1416 |
# }, |
| 1417 |
# { |
| 1418 |
# "name": "a_very_long_vlan_name_a_very_long_vlan_name", |
| 1419 |
# "vlan_id": 888, |
| 1420 |
# "state": "active", |
| 1421 |
# "shutdown": "disabled", |
| 1422 |
# "mtu": 1500, |
| 1423 |
# }, |
| 1424 |
# { |
| 1425 |
# "name": "fddi-default", |
| 1426 |
# "vlan_id": 1002, |
| 1427 |
# "state": "active", |
| 1428 |
# "shutdown": "enabled", |
| 1429 |
# "mtu": 1500, |
| 1430 |
# }, |
| 1431 |
# { |
| 1432 |
# "name": "trcrf-default", |
| 1433 |
# "vlan_id": 1003, |
| 1434 |
# "state": "active", |
| 1435 |
# "shutdown": "enabled", |
| 1436 |
# "mtu": 4472, |
| 1437 |
# }, |
| 1438 |
# { |
| 1439 |
# "name": "fddinet-default", |
| 1440 |
# "vlan_id": 1004, |
| 1441 |
# "state": "active", |
| 1442 |
# "shutdown": "enabled", |
| 1443 |
# "mtu": 1500, |
| 1444 |
# }, |
| 1445 |
# { |
| 1446 |
# "name": "trbrf-default", |
| 1447 |
# "vlan_id": 1005, |
| 1448 |
# "state": "active", |
| 1449 |
# "shutdown": "enabled", |
| 1450 |
# "mtu": 4472, |
| 1451 |
# }, |
| 1452 |
# {"vlan_id": 102, "member": {"evi": 102, "vni": 10102}}, |
| 1453 |
# {"vlan_id": 901, "member": {"vni": 50901}}, |
| 1454 |
# ] |
| 1455 |
|
| 1456 |
|
| 1457 |
|
| 1458 |
Return Values |
| 1459 |
------------- |
| 1460 |
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: |
| 1461 |
|
| 1462 |
.. raw:: html |
| 1463 |
|
| 1464 |
<table border=0 cellpadding=0 class="documentation-table"> |
| 1465 |
<tr> |
| 1466 |
<th colspan="1">Key</th> |
| 1467 |
<th>Returned</th> |
| 1468 |
<th width="100%">Description</th> |
| 1469 |
</tr> |
| 1470 |
<tr> |
| 1471 |
<td colspan="1"> |
| 1472 |
<div class="ansibleOptionAnchor" id="return-"></div> |
| 1473 |
<b>after</b> |
| 1474 |
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> |
| 1475 |
<div style="font-size: small"> |
| 1476 |
<span style="color: purple">dictionary</span> |
| 1477 |
</div> |
| 1478 |
</td> |
| 1479 |
<td>when changed</td> |
| 1480 |
<td> |
| 1481 |
<div>The resulting configuration after module execution.</div> |
| 1482 |
<br/> |
| 1483 |
<div style="font-size: smaller"><b>Sample:</b></div> |
| 1484 |
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div> |
| 1485 |
</td> |
| 1486 |
</tr> |
| 1487 |
<tr> |
| 1488 |
<td colspan="1"> |
| 1489 |
<div class="ansibleOptionAnchor" id="return-"></div> |
| 1490 |
<b>before</b> |
| 1491 |
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> |
| 1492 |
<div style="font-size: small"> |
| 1493 |
<span style="color: purple">dictionary</span> |
| 1494 |
</div> |
| 1495 |
</td> |
| 1496 |
<td>when <em>state</em> is <code>merged</code>, <code>replaced</code>, <code>overridden</code>, <code>deleted</code> or <code>purged</code></td> |
| 1497 |
<td> |
| 1498 |
<div>The configuration prior to the module execution.</div> |
| 1499 |
<br/> |
| 1500 |
<div style="font-size: smaller"><b>Sample:</b></div> |
| 1501 |
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div> |
| 1502 |
</td> |
| 1503 |
</tr> |
| 1504 |
<tr> |
| 1505 |
<td colspan="1"> |
| 1506 |
<div class="ansibleOptionAnchor" id="return-"></div> |
| 1507 |
<b>commands</b> |
| 1508 |
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> |
| 1509 |
<div style="font-size: small"> |
| 1510 |
<span style="color: purple">list</span> |
| 1511 |
</div> |
| 1512 |
</td> |
| 1513 |
<td>when <em>state</em> is <code>merged</code>, <code>replaced</code>, <code>overridden</code>, <code>deleted</code> or <code>purged</code></td> |
| 1514 |
<td> |
| 1515 |
<div>The set of commands pushed to the remote device.</div> |
| 1516 |
<br/> |
| 1517 |
<div style="font-size: smaller"><b>Sample:</b></div> |
| 1518 |
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">['vlan configuration 202', 'state active', 'remote-span']</div> |
| 1519 |
</td> |
| 1520 |
</tr> |
| 1521 |
<tr> |
| 1522 |
<td colspan="1"> |
| 1523 |
<div class="ansibleOptionAnchor" id="return-"></div> |
| 1524 |
<b>gathered</b> |
| 1525 |
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> |
| 1526 |
<div style="font-size: small"> |
| 1527 |
<span style="color: purple">list</span> |
| 1528 |
</div> |
| 1529 |
</td> |
| 1530 |
<td>when <em>state</em> is <code>gathered</code></td> |
| 1531 |
<td> |
| 1532 |
<div>Facts about the network resource gathered from the remote device as structured data.</div> |
| 1533 |
<br/> |
| 1534 |
<div style="font-size: smaller"><b>Sample:</b></div> |
| 1535 |
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div> |
| 1536 |
</td> |
| 1537 |
</tr> |
| 1538 |
<tr> |
| 1539 |
<td colspan="1"> |
| 1540 |
<div class="ansibleOptionAnchor" id="return-"></div> |
| 1541 |
<b>parsed</b> |
| 1542 |
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> |
| 1543 |
<div style="font-size: small"> |
| 1544 |
<span style="color: purple">list</span> |
| 1545 |
</div> |
| 1546 |
</td> |
| 1547 |
<td>when <em>state</em> is <code>parsed</code></td> |
| 1548 |
<td> |
| 1549 |
<div>The device native config provided in <em>running_config</em> option parsed into structured data as per module argspec.</div> |
| 1550 |
<br/> |
| 1551 |
<div style="font-size: smaller"><b>Sample:</b></div> |
| 1552 |
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div> |
| 1553 |
</td> |
| 1554 |
</tr> |
| 1555 |
<tr> |
| 1556 |
<td colspan="1"> |
| 1557 |
<div class="ansibleOptionAnchor" id="return-"></div> |
| 1558 |
<b>rendered</b> |
| 1559 |
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> |
| 1560 |
<div style="font-size: small"> |
| 1561 |
<span style="color: purple">list</span> |
| 1562 |
</div> |
| 1563 |
</td> |
| 1564 |
<td>when <em>state</em> is <code>rendered</code></td> |
| 1565 |
<td> |
| 1566 |
<div>The provided configuration in the task rendered in device-native format (offline).</div> |
| 1567 |
<br/> |
| 1568 |
<div style="font-size: smaller"><b>Sample:</b></div> |
| 1569 |
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">['vlan configuration 202', 'member evpn-instance 202 vni 10202', 'vlan 200']</div> |
| 1570 |
</td> |
| 1571 |
</tr> |
| 1572 |
</table> |
| 1573 |
<br/><br/> |
| 1574 |
|
| 1575 |
|
| 1576 |
Status |
| 1577 |
------ |
| 1578 |
|
| 1579 |
|
| 1580 |
Authors |
| 1581 |
~~~~~~~ |
| 1582 |
|
| 1583 |
- Sumit Jaiswal (@justjais) |
| 1584 |
- Sagar Paul (@KB-perByte) |
| 1585 |
- Padmini Priyadarshini Sivaraj (@PadminiSivaraj) |