| 1 |
.. _cisco.ios.ios_evpn_evi_module: |
| 2 |
|
| 3 |
|
| 4 |
********************** |
| 5 |
cisco.ios.ios_evpn_evi |
| 6 |
********************** |
| 7 |
|
| 8 |
**Resource module to configure L2VPN EVPN EVI.** |
| 9 |
|
| 10 |
|
| 11 |
Version added: 5.3.0 |
| 12 |
|
| 13 |
.. contents:: |
| 14 |
:local: |
| 15 |
:depth: 1 |
| 16 |
|
| 17 |
|
| 18 |
Synopsis |
| 19 |
-------- |
| 20 |
- This module provides declarative management of L2VPN EVPN EVI 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="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>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 L2VPN Ethernet Virtual Private Network (EVPN) EVI configuration</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_gateway</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>Default Gateway parameters</div> |
| 66 |
</td> |
| 67 |
</tr> |
| 68 |
<tr> |
| 69 |
<td class="elbow-placeholder"></td> |
| 70 |
<td class="elbow-placeholder"></td> |
| 71 |
<td colspan="2"> |
| 72 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 73 |
<b>advertise</b> |
| 74 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 75 |
<div style="font-size: small"> |
| 76 |
<span style="color: purple">dictionary</span> |
| 77 |
</div> |
| 78 |
</td> |
| 79 |
<td> |
| 80 |
</td> |
| 81 |
<td> |
| 82 |
<div>Advertise Default Gateway MAC/IP routes</div> |
| 83 |
</td> |
| 84 |
</tr> |
| 85 |
<tr> |
| 86 |
<td class="elbow-placeholder"></td> |
| 87 |
<td class="elbow-placeholder"></td> |
| 88 |
<td class="elbow-placeholder"></td> |
| 89 |
<td colspan="1"> |
| 90 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 91 |
<b>disable</b> |
| 92 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 93 |
<div style="font-size: small"> |
| 94 |
<span style="color: purple">boolean</span> |
| 95 |
</div> |
| 96 |
</td> |
| 97 |
<td> |
| 98 |
<ul style="margin: 0; padding: 0"><b>Choices:</b> |
| 99 |
<li>no</li> |
| 100 |
<li>yes</li> |
| 101 |
</ul> |
| 102 |
</td> |
| 103 |
<td> |
| 104 |
<div>Disable advertisement of Default Gateway MAC/IP routes</div> |
| 105 |
</td> |
| 106 |
</tr> |
| 107 |
<tr> |
| 108 |
<td class="elbow-placeholder"></td> |
| 109 |
<td class="elbow-placeholder"></td> |
| 110 |
<td class="elbow-placeholder"></td> |
| 111 |
<td colspan="1"> |
| 112 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 113 |
<b>enable</b> |
| 114 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 115 |
<div style="font-size: small"> |
| 116 |
<span style="color: purple">boolean</span> |
| 117 |
</div> |
| 118 |
</td> |
| 119 |
<td> |
| 120 |
<ul style="margin: 0; padding: 0"><b>Choices:</b> |
| 121 |
<li>no</li> |
| 122 |
<li>yes</li> |
| 123 |
</ul> |
| 124 |
</td> |
| 125 |
<td> |
| 126 |
<div>Enable advertisement of Default Gateway MAC/IP routes</div> |
| 127 |
</td> |
| 128 |
</tr> |
| 129 |
|
| 130 |
|
| 131 |
<tr> |
| 132 |
<td class="elbow-placeholder"></td> |
| 133 |
<td colspan="3"> |
| 134 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 135 |
<b>encapsulation</b> |
| 136 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 137 |
<div style="font-size: small"> |
| 138 |
<span style="color: purple">string</span> |
| 139 |
</div> |
| 140 |
</td> |
| 141 |
<td> |
| 142 |
<ul style="margin: 0; padding: 0"><b>Choices:</b> |
| 143 |
<li><div style="color: blue"><b>vxlan</b> ←</div></li> |
| 144 |
</ul> |
| 145 |
</td> |
| 146 |
<td> |
| 147 |
<div>EVPN encapsulation type</div> |
| 148 |
</td> |
| 149 |
</tr> |
| 150 |
<tr> |
| 151 |
<td class="elbow-placeholder"></td> |
| 152 |
<td colspan="3"> |
| 153 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 154 |
<b>evi</b> |
| 155 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 156 |
<div style="font-size: small"> |
| 157 |
<span style="color: purple">integer</span> |
| 158 |
/ <span style="color: red">required</span> |
| 159 |
</div> |
| 160 |
</td> |
| 161 |
<td> |
| 162 |
</td> |
| 163 |
<td> |
| 164 |
<div>EVPN instance value</div> |
| 165 |
</td> |
| 166 |
</tr> |
| 167 |
<tr> |
| 168 |
<td class="elbow-placeholder"></td> |
| 169 |
<td colspan="3"> |
| 170 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 171 |
<b>ip</b> |
| 172 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 173 |
<div style="font-size: small"> |
| 174 |
<span style="color: purple">dictionary</span> |
| 175 |
</div> |
| 176 |
</td> |
| 177 |
<td> |
| 178 |
</td> |
| 179 |
<td> |
| 180 |
<div>IP parameters</div> |
| 181 |
</td> |
| 182 |
</tr> |
| 183 |
<tr> |
| 184 |
<td class="elbow-placeholder"></td> |
| 185 |
<td class="elbow-placeholder"></td> |
| 186 |
<td colspan="2"> |
| 187 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 188 |
<b>local_learning</b> |
| 189 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 190 |
<div style="font-size: small"> |
| 191 |
<span style="color: purple">dictionary</span> |
| 192 |
</div> |
| 193 |
</td> |
| 194 |
<td> |
| 195 |
</td> |
| 196 |
<td> |
| 197 |
<div>IP local learning</div> |
| 198 |
</td> |
| 199 |
</tr> |
| 200 |
<tr> |
| 201 |
<td class="elbow-placeholder"></td> |
| 202 |
<td class="elbow-placeholder"></td> |
| 203 |
<td class="elbow-placeholder"></td> |
| 204 |
<td colspan="1"> |
| 205 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 206 |
<b>disable</b> |
| 207 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 208 |
<div style="font-size: small"> |
| 209 |
<span style="color: purple">boolean</span> |
| 210 |
</div> |
| 211 |
</td> |
| 212 |
<td> |
| 213 |
<ul style="margin: 0; padding: 0"><b>Choices:</b> |
| 214 |
<li>no</li> |
| 215 |
<li>yes</li> |
| 216 |
</ul> |
| 217 |
</td> |
| 218 |
<td> |
| 219 |
<div>Disable IP local learning</div> |
| 220 |
</td> |
| 221 |
</tr> |
| 222 |
<tr> |
| 223 |
<td class="elbow-placeholder"></td> |
| 224 |
<td class="elbow-placeholder"></td> |
| 225 |
<td class="elbow-placeholder"></td> |
| 226 |
<td colspan="1"> |
| 227 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 228 |
<b>enable</b> |
| 229 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 230 |
<div style="font-size: small"> |
| 231 |
<span style="color: purple">boolean</span> |
| 232 |
</div> |
| 233 |
</td> |
| 234 |
<td> |
| 235 |
<ul style="margin: 0; padding: 0"><b>Choices:</b> |
| 236 |
<li>no</li> |
| 237 |
<li>yes</li> |
| 238 |
</ul> |
| 239 |
</td> |
| 240 |
<td> |
| 241 |
<div>Enable IP local learning</div> |
| 242 |
</td> |
| 243 |
</tr> |
| 244 |
|
| 245 |
|
| 246 |
<tr> |
| 247 |
<td class="elbow-placeholder"></td> |
| 248 |
<td colspan="3"> |
| 249 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 250 |
<b>replication_type</b> |
| 251 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 252 |
<div style="font-size: small"> |
| 253 |
<span style="color: purple">string</span> |
| 254 |
</div> |
| 255 |
</td> |
| 256 |
<td> |
| 257 |
<ul style="margin: 0; padding: 0"><b>Choices:</b> |
| 258 |
<li>ingress</li> |
| 259 |
<li>static</li> |
| 260 |
</ul> |
| 261 |
</td> |
| 262 |
<td> |
| 263 |
<div>Method for replicating BUM traffic</div> |
| 264 |
</td> |
| 265 |
</tr> |
| 266 |
<tr> |
| 267 |
<td class="elbow-placeholder"></td> |
| 268 |
<td colspan="3"> |
| 269 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 270 |
<b>route_distinguisher</b> |
| 271 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 272 |
<div style="font-size: small"> |
| 273 |
<span style="color: purple">string</span> |
| 274 |
</div> |
| 275 |
</td> |
| 276 |
<td> |
| 277 |
</td> |
| 278 |
<td> |
| 279 |
<div>EVPN Route Distinguisher</div> |
| 280 |
</td> |
| 281 |
</tr> |
| 282 |
|
| 283 |
<tr> |
| 284 |
<td colspan="4"> |
| 285 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 286 |
<b>running_config</b> |
| 287 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 288 |
<div style="font-size: small"> |
| 289 |
<span style="color: purple">string</span> |
| 290 |
</div> |
| 291 |
</td> |
| 292 |
<td> |
| 293 |
</td> |
| 294 |
<td> |
| 295 |
<div>This option is used only with state <em>parsed</em>.</div> |
| 296 |
<div>The value of this option should be the output received from the IOS device by executing the command <b>sh running-config nve | section ^l2vpn evpn$</b>.</div> |
| 297 |
<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> |
| 298 |
</td> |
| 299 |
</tr> |
| 300 |
<tr> |
| 301 |
<td colspan="4"> |
| 302 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 303 |
<b>state</b> |
| 304 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 305 |
<div style="font-size: small"> |
| 306 |
<span style="color: purple">string</span> |
| 307 |
</div> |
| 308 |
</td> |
| 309 |
<td> |
| 310 |
<ul style="margin: 0; padding: 0"><b>Choices:</b> |
| 311 |
<li><div style="color: blue"><b>merged</b> ←</div></li> |
| 312 |
<li>replaced</li> |
| 313 |
<li>overridden</li> |
| 314 |
<li>deleted</li> |
| 315 |
<li>gathered</li> |
| 316 |
<li>rendered</li> |
| 317 |
<li>parsed</li> |
| 318 |
</ul> |
| 319 |
</td> |
| 320 |
<td> |
| 321 |
<div>The state the configuration should be left in</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 |
- This module works with connection ``network_cli``. See https://docs.ansible.com/ansible/latest/network/user_guide/platform_ios.html |
| 334 |
|
| 335 |
|
| 336 |
|
| 337 |
Examples |
| 338 |
-------- |
| 339 |
|
| 340 |
.. code-block:: yaml |
| 341 |
|
| 342 |
# Using state merged |
| 343 |
|
| 344 |
# Before state: |
| 345 |
# ------------- |
| 346 |
# l2vpn evpn instance 101 vlan-based |
| 347 |
# encapsulation vxlan |
| 348 |
# replication-type static |
| 349 |
# ! |
| 350 |
# l2vpn evpn instance 102 vlan-based |
| 351 |
# encapsulation vxlan |
| 352 |
# replication-type ingress |
| 353 |
# ! |
| 354 |
# l2vpn evpn instance 201 vlan-based |
| 355 |
# encapsulation vxlan |
| 356 |
# replication-type static |
| 357 |
# ! |
| 358 |
# l2vpn evpn instance 202 vlan-based |
| 359 |
# encapsulation vxlan |
| 360 |
# replication-type ingress |
| 361 |
|
| 362 |
# - name: Merge provided configuration with device configuration |
| 363 |
# cisco.ios.ios_evpn_evi: |
| 364 |
# config: |
| 365 |
# - evi: 101 |
| 366 |
# replication_type: ingress |
| 367 |
# route_distinguisher: '1:1' |
| 368 |
# default_gateway: |
| 369 |
# advertise: |
| 370 |
# enable: False |
| 371 |
# ip: |
| 372 |
# local_learning: |
| 373 |
# enable: True |
| 374 |
# |
| 375 |
# - evi: 202 |
| 376 |
# replication_type: static |
| 377 |
# default_gateway: |
| 378 |
# advertise: |
| 379 |
# enable: True |
| 380 |
# ip: |
| 381 |
# local_learning: |
| 382 |
# disable: True |
| 383 |
# state: merged |
| 384 |
|
| 385 |
# Commands Fired: |
| 386 |
# --------------- |
| 387 |
# "commands": [ |
| 388 |
# "l2vpn evpn instance 101 vlan-based", |
| 389 |
# "ip local-learning enable", |
| 390 |
# "replication-type ingress", |
| 391 |
# "rd 1:1", |
| 392 |
# "l2vpn evpn instance 202 vlan-based", |
| 393 |
# "default-gateway advertise enable", |
| 394 |
# "ip local-learning disable", |
| 395 |
# "replication-type static" |
| 396 |
# ], |
| 397 |
|
| 398 |
# After state: |
| 399 |
# ------------ |
| 400 |
# l2vpn evpn instance 101 vlan-based |
| 401 |
# encapsulation vxlan |
| 402 |
# rd 1:1 |
| 403 |
# replication-type ingress |
| 404 |
# ip local-learning enable |
| 405 |
# ! |
| 406 |
# l2vpn evpn instance 102 vlan-based |
| 407 |
# encapsulation vxlan |
| 408 |
# replication-type ingress |
| 409 |
# ! |
| 410 |
# l2vpn evpn instance 201 vlan-based |
| 411 |
# encapsulation vxlan |
| 412 |
# replication-type static |
| 413 |
# ! |
| 414 |
# l2vpn evpn instance 202 vlan-based |
| 415 |
# encapsulation vxlan |
| 416 |
# replication-type static |
| 417 |
# ip local-learning disable |
| 418 |
# default-gateway advertise enable |
| 419 |
|
| 420 |
|
| 421 |
# Using state replaced |
| 422 |
|
| 423 |
# Before state: |
| 424 |
# ------------- |
| 425 |
# l2vpn evpn instance 101 vlan-based |
| 426 |
# encapsulation vxlan |
| 427 |
# rd 1:1 |
| 428 |
# replication-type ingress |
| 429 |
# ip local-learning enable |
| 430 |
# ! |
| 431 |
# l2vpn evpn instance 102 vlan-based |
| 432 |
# encapsulation vxlan |
| 433 |
# replication-type ingress |
| 434 |
# ! |
| 435 |
# l2vpn evpn instance 201 vlan-based |
| 436 |
# encapsulation vxlan |
| 437 |
# replication-type static |
| 438 |
# ! |
| 439 |
# l2vpn evpn instance 202 vlan-based |
| 440 |
# encapsulation vxlan |
| 441 |
# replication-type static |
| 442 |
# ip local-learning disable |
| 443 |
# default-gateway advertise enable |
| 444 |
|
| 445 |
# - name: Replaces the device configuration with the provided configuration |
| 446 |
# cisco.ios.ios_evpn_evi: |
| 447 |
# config: |
| 448 |
# - evi: 101 |
| 449 |
# replication_type: ingress |
| 450 |
# default_gateway: |
| 451 |
# advertise: |
| 452 |
# enable: True |
| 453 |
# - evi: 202 |
| 454 |
# replication_type: ingress |
| 455 |
# state: replaced |
| 456 |
|
| 457 |
# Commands Fired: |
| 458 |
# --------------- |
| 459 |
# "commands": [ |
| 460 |
# "l2vpn evpn instance 101 vlan-based", |
| 461 |
# "default-gateway advertise enable", |
| 462 |
# "no ip local-learning enable", |
| 463 |
# "no rd 1:1", |
| 464 |
# "l2vpn evpn instance 202 vlan-based", |
| 465 |
# "no default-gateway advertise enable", |
| 466 |
# "no ip local-learning disable", |
| 467 |
# "replication-type ingress" |
| 468 |
# ], |
| 469 |
|
| 470 |
# After state: |
| 471 |
# ------------ |
| 472 |
# l2vpn evpn instance 101 vlan-based |
| 473 |
# encapsulation vxlan |
| 474 |
# replication-type ingress |
| 475 |
# default-gateway advertise enable |
| 476 |
# ! |
| 477 |
# l2vpn evpn instance 102 vlan-based |
| 478 |
# encapsulation vxlan |
| 479 |
# replication-type ingress |
| 480 |
# ! |
| 481 |
# l2vpn evpn instance 201 vlan-based |
| 482 |
# encapsulation vxlan |
| 483 |
# replication-type static |
| 484 |
# ! |
| 485 |
# l2vpn evpn instance 202 vlan-based |
| 486 |
# encapsulation vxlan |
| 487 |
# replication-type ingress |
| 488 |
|
| 489 |
# Using state overridden |
| 490 |
|
| 491 |
# Before state: |
| 492 |
# ------------- |
| 493 |
# l2vpn evpn instance 101 vlan-based |
| 494 |
# encapsulation vxlan |
| 495 |
# replication-type ingress |
| 496 |
# default-gateway advertise enable |
| 497 |
# ! |
| 498 |
# l2vpn evpn instance 102 vlan-based |
| 499 |
# encapsulation vxlan |
| 500 |
# replication-type ingress |
| 501 |
# ! |
| 502 |
# l2vpn evpn instance 201 vlan-based |
| 503 |
# encapsulation vxlan |
| 504 |
# replication-type static |
| 505 |
# ! |
| 506 |
# l2vpn evpn instance 202 vlan-based |
| 507 |
# encapsulation vxlan |
| 508 |
# replication-type ingress |
| 509 |
|
| 510 |
# - name: Override the device configuration with provided configuration |
| 511 |
# cisco.ios.ios_evpn_evi: |
| 512 |
# config: |
| 513 |
# - evi: 101 |
| 514 |
# replication_type: ingress |
| 515 |
# default_gateway: |
| 516 |
# advertise: |
| 517 |
# enable: True |
| 518 |
# - evi: 202 |
| 519 |
# replication_type: static |
| 520 |
# default_gateway: |
| 521 |
# advertise: |
| 522 |
# enable: True |
| 523 |
# state: overridden |
| 524 |
|
| 525 |
# Commands Fired: |
| 526 |
# --------------- |
| 527 |
# "commands": [ |
| 528 |
# "no l2vpn evpn instance 102 vlan-based", |
| 529 |
# "no l2vpn evpn instance 201 vlan-based", |
| 530 |
# "l2vpn evpn instance 202 vlan-based", |
| 531 |
# "default-gateway advertise enable", |
| 532 |
# "replication-type static" |
| 533 |
# ], |
| 534 |
|
| 535 |
# After state: |
| 536 |
# ------------ |
| 537 |
# l2vpn evpn instance 101 vlan-based |
| 538 |
# encapsulation vxlan |
| 539 |
# replication-type ingress |
| 540 |
# default-gateway advertise enable |
| 541 |
# ! |
| 542 |
# l2vpn evpn instance 202 vlan-based |
| 543 |
# encapsulation vxlan |
| 544 |
# replication-type static |
| 545 |
# default-gateway advertise enable |
| 546 |
|
| 547 |
|
| 548 |
# Using state Deleted |
| 549 |
|
| 550 |
# Before state: |
| 551 |
# ------------- |
| 552 |
# l2vpn evpn instance 101 vlan-based |
| 553 |
# encapsulation vxlan |
| 554 |
# replication-type ingress |
| 555 |
# default-gateway advertise enable |
| 556 |
# l2vpn evpn instance 102 vlan-based |
| 557 |
# encapsulation vxlan |
| 558 |
# replication-type ingress |
| 559 |
# l2vpn evpn instance 202 vlan-based |
| 560 |
# encapsulation vxlan |
| 561 |
# replication-type static |
| 562 |
# default-gateway advertise enable |
| 563 |
|
| 564 |
# - name: "Delete the given EVI(s)" |
| 565 |
# cisco.ios.ios_evpn_evi: |
| 566 |
# config: |
| 567 |
# - evi: 101 |
| 568 |
# state: deleted |
| 569 |
|
| 570 |
# Commands Fired: |
| 571 |
# --------------- |
| 572 |
# "commands": [ |
| 573 |
# "no l2vpn evpn instance 101 vlan-based" |
| 574 |
# ], |
| 575 |
|
| 576 |
# After state: |
| 577 |
# ------------- |
| 578 |
# l2vpn evpn instance 102 vlan-based |
| 579 |
# encapsulation vxlan |
| 580 |
# replication-type ingress |
| 581 |
# l2vpn evpn instance 202 vlan-based |
| 582 |
# encapsulation vxlan |
| 583 |
# replication-type static |
| 584 |
# default-gateway advertise enable |
| 585 |
|
| 586 |
# Using state Deleted without any config passed |
| 587 |
|
| 588 |
# Before state: |
| 589 |
# ------------- |
| 590 |
# l2vpn evpn instance 102 vlan-based |
| 591 |
# encapsulation vxlan |
| 592 |
# replication-type ingress |
| 593 |
# l2vpn evpn instance 202 vlan-based |
| 594 |
# encapsulation vxlan |
| 595 |
# replication-type static |
| 596 |
# default-gateway advertise enable |
| 597 |
|
| 598 |
# - name: "Delete ALL EVIs" |
| 599 |
# cisco.ios.ios_evpn_evi: |
| 600 |
# state: deleted |
| 601 |
|
| 602 |
# Commands Fired: |
| 603 |
# --------------- |
| 604 |
# "commands": [ |
| 605 |
# "no l2vpn evpn instance 102 vlan-based", |
| 606 |
# "no l2vpn evpn instance 202 vlan-based" |
| 607 |
# ], |
| 608 |
|
| 609 |
# After state: |
| 610 |
# ------------- |
| 611 |
# ! |
| 612 |
|
| 613 |
# Using gathered |
| 614 |
|
| 615 |
# Before state: |
| 616 |
# ------------- |
| 617 |
# |
| 618 |
# l2vpn evpn instance 101 vlan-based |
| 619 |
# encapsulation vxlan |
| 620 |
# replication-type static |
| 621 |
# ! |
| 622 |
# l2vpn evpn instance 102 vlan-based |
| 623 |
# encapsulation vxlan |
| 624 |
# replication-type ingress |
| 625 |
# ! |
| 626 |
# l2vpn evpn instance 201 vlan-based |
| 627 |
# encapsulation vxlan |
| 628 |
# replication-type static |
| 629 |
# ! |
| 630 |
# l2vpn evpn instance 202 vlan-based |
| 631 |
# encapsulation vxlan |
| 632 |
# replication-type ingress |
| 633 |
|
| 634 |
# - name: Gather facts for evpn_evi |
| 635 |
# cisco.ios.ios_evpn_evi: |
| 636 |
# config: |
| 637 |
# state: gathered |
| 638 |
|
| 639 |
# Task Output: |
| 640 |
# ------------ |
| 641 |
# |
| 642 |
# gathered: |
| 643 |
# - evi: 101 |
| 644 |
# encapsulation: vxlan |
| 645 |
# replication_type: static |
| 646 |
# - evi: 102 |
| 647 |
# encapsulation: vxlan |
| 648 |
# replication_type: ingress |
| 649 |
# - evi: 201 |
| 650 |
# encapsulation: vxlan |
| 651 |
# replication_type: static |
| 652 |
# - evi: 202 |
| 653 |
# encapsulation: vxlan |
| 654 |
# replication_type: ingress |
| 655 |
|
| 656 |
# Using Rendered |
| 657 |
|
| 658 |
# - name: Rendered the provided configuration with the existing running configuration |
| 659 |
# cisco.ios.ios_evpn_evi: |
| 660 |
# config: |
| 661 |
# - evi: 101 |
| 662 |
# replication_type: ingress |
| 663 |
# default_gateway: |
| 664 |
# advertise: |
| 665 |
# enable: True |
| 666 |
# - evi: 202 |
| 667 |
# replication_type: ingress |
| 668 |
# state: rendered |
| 669 |
|
| 670 |
# Task Output: |
| 671 |
# ------------ |
| 672 |
# |
| 673 |
# rendered: |
| 674 |
# - l2vpn evpn instance 101 vlan-based |
| 675 |
# - default-gateway advertise enable |
| 676 |
# - replication-type ingress |
| 677 |
# - l2vpn evpn instance 202 vlan-based |
| 678 |
# - replication-type ingress |
| 679 |
|
| 680 |
|
| 681 |
# Using parsed |
| 682 |
|
| 683 |
# File: parsed.cfg |
| 684 |
# ---------------- |
| 685 |
# |
| 686 |
# l2vpn evpn instance 101 vlan-based |
| 687 |
# encapsulation vxlan |
| 688 |
# replication-type ingress |
| 689 |
# default-gateway advertise enable |
| 690 |
# ! |
| 691 |
# l2vpn evpn instance 102 vlan-based |
| 692 |
# encapsulation vxlan |
| 693 |
# replication-type ingress |
| 694 |
# ! |
| 695 |
|
| 696 |
# - name: Parse the commands for provided configuration |
| 697 |
# cisco.ios.ios_evpn_evi: |
| 698 |
# running_config: "{{ lookup('file', 'parsed.cfg') }}" |
| 699 |
# state: parsed |
| 700 |
|
| 701 |
# Task Output: |
| 702 |
# ------------ |
| 703 |
# |
| 704 |
# parsed: |
| 705 |
# - evi: 101 |
| 706 |
# encapsulation: vxlan |
| 707 |
# replication_type: ingress |
| 708 |
# default_gateway: |
| 709 |
# advertise: |
| 710 |
# enable: true |
| 711 |
# - evi: 102 |
| 712 |
# encapsulation: vxlan |
| 713 |
# replication_type: ingress |
| 714 |
|
| 715 |
|
| 716 |
|
| 717 |
Return Values |
| 718 |
------------- |
| 719 |
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: |
| 720 |
|
| 721 |
.. raw:: html |
| 722 |
|
| 723 |
<table border=0 cellpadding=0 class="documentation-table"> |
| 724 |
<tr> |
| 725 |
<th colspan="1">Key</th> |
| 726 |
<th>Returned</th> |
| 727 |
<th width="100%">Description</th> |
| 728 |
</tr> |
| 729 |
<tr> |
| 730 |
<td colspan="1"> |
| 731 |
<div class="ansibleOptionAnchor" id="return-"></div> |
| 732 |
<b>after</b> |
| 733 |
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> |
| 734 |
<div style="font-size: small"> |
| 735 |
<span style="color: purple">dictionary</span> |
| 736 |
</div> |
| 737 |
</td> |
| 738 |
<td>when changed</td> |
| 739 |
<td> |
| 740 |
<div>The resulting configuration after module execution.</div> |
| 741 |
<br/> |
| 742 |
<div style="font-size: smaller"><b>Sample:</b></div> |
| 743 |
<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> |
| 744 |
</td> |
| 745 |
</tr> |
| 746 |
<tr> |
| 747 |
<td colspan="1"> |
| 748 |
<div class="ansibleOptionAnchor" id="return-"></div> |
| 749 |
<b>before</b> |
| 750 |
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> |
| 751 |
<div style="font-size: small"> |
| 752 |
<span style="color: purple">dictionary</span> |
| 753 |
</div> |
| 754 |
</td> |
| 755 |
<td>when <em>state</em> is <code>merged</code>, <code>replaced</code>, <code>overridden</code>, <code>deleted</code> or <code>purged</code></td> |
| 756 |
<td> |
| 757 |
<div>The configuration prior to the module execution.</div> |
| 758 |
<br/> |
| 759 |
<div style="font-size: smaller"><b>Sample:</b></div> |
| 760 |
<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> |
| 761 |
</td> |
| 762 |
</tr> |
| 763 |
<tr> |
| 764 |
<td colspan="1"> |
| 765 |
<div class="ansibleOptionAnchor" id="return-"></div> |
| 766 |
<b>commands</b> |
| 767 |
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> |
| 768 |
<div style="font-size: small"> |
| 769 |
<span style="color: purple">list</span> |
| 770 |
</div> |
| 771 |
</td> |
| 772 |
<td>when <em>state</em> is <code>merged</code>, <code>replaced</code>, <code>overridden</code>, <code>deleted</code> or <code>purged</code></td> |
| 773 |
<td> |
| 774 |
<div>The set of commands pushed to the remote device.</div> |
| 775 |
<br/> |
| 776 |
<div style="font-size: smaller"><b>Sample:</b></div> |
| 777 |
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">['l2vpn evpn instance 101 vlan-based', 'encapsulation vxlan', 'replication-type ingress']</div> |
| 778 |
</td> |
| 779 |
</tr> |
| 780 |
</table> |
| 781 |
<br/><br/> |
| 782 |
|
| 783 |
|
| 784 |
Status |
| 785 |
------ |
| 786 |
|
| 787 |
|
| 788 |
Authors |
| 789 |
~~~~~~~ |
| 790 |
|
| 791 |
- Padmini Priyadarshini Sivaraj (@PadminiSivaraj) |