Debian Codegraph @

ansible_collections/cisco/ios/docs/cisco.ios.ios_evpn_ethernet_module.rst

raw
1 .. _cisco.ios.ios_evpn_ethernet_module:
2
3
4 ***************************
5 cisco.ios.ios_evpn_ethernet
6 ***************************
7
8 **Resource module to configure L2VPN EVPN Ethernet Segment.**
9
10
11 Version added: 9.2.0
12
13 .. contents::
14 :local:
15 :depth: 1
16
17
18 Synopsis
19 --------
20 - This module manages the L2VPN EVPN Ethernet Segment attributes of 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 L2VPN EVPN Ethernet Segment 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>default</b>
57 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
58 <div style="font-size: small">
59 <span style="color: purple">boolean</span>
60 </div>
61 </td>
62 <td>
63 <ul style="margin: 0; padding: 0"><b>Choices:</b>
64 <li>no</li>
65 <li>yes</li>
66 </ul>
67 </td>
68 <td>
69 <div>Set a command to its defaults</div>
70 </td>
71 </tr>
72 <tr>
73 <td class="elbow-placeholder"></td>
74 <td colspan="2">
75 <div class="ansibleOptionAnchor" id="parameter-"></div>
76 <b>df_election</b>
77 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
78 <div style="font-size: small">
79 <span style="color: purple">dictionary</span>
80 </div>
81 </td>
82 <td>
83 </td>
84 <td>
85 <div>Designated forwarder election parameters</div>
86 </td>
87 </tr>
88 <tr>
89 <td class="elbow-placeholder"></td>
90 <td class="elbow-placeholder"></td>
91 <td colspan="1">
92 <div class="ansibleOptionAnchor" id="parameter-"></div>
93 <b>preempt_time</b>
94 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
95 <div style="font-size: small">
96 <span style="color: purple">integer</span>
97 </div>
98 </td>
99 <td>
100 </td>
101 <td>
102 <div>Preempt time before advertising routes</div>
103 </td>
104 </tr>
105 <tr>
106 <td class="elbow-placeholder"></td>
107 <td class="elbow-placeholder"></td>
108 <td colspan="1">
109 <div class="ansibleOptionAnchor" id="parameter-"></div>
110 <b>wait_time</b>
111 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
112 <div style="font-size: small">
113 <span style="color: purple">integer</span>
114 </div>
115 </td>
116 <td>
117 </td>
118 <td>
119 <div>Designated forwarder election wait time</div>
120 </td>
121 </tr>
122
123 <tr>
124 <td class="elbow-placeholder"></td>
125 <td colspan="2">
126 <div class="ansibleOptionAnchor" id="parameter-"></div>
127 <b>identifier</b>
128 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
129 <div style="font-size: small">
130 <span style="color: purple">dictionary</span>
131 </div>
132 </td>
133 <td>
134 </td>
135 <td>
136 <div>Ethernet Segment Identifiers</div>
137 </td>
138 </tr>
139 <tr>
140 <td class="elbow-placeholder"></td>
141 <td class="elbow-placeholder"></td>
142 <td colspan="1">
143 <div class="ansibleOptionAnchor" id="parameter-"></div>
144 <b>esi_value</b>
145 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
146 <div style="font-size: small">
147 <span style="color: purple">string</span>
148 </div>
149 </td>
150 <td>
151 </td>
152 <td>
153 <div>system mac or 9-octet ESI value in hex</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>identifier_type</b>
162 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
163 <div style="font-size: small">
164 <span style="color: purple">string</span>
165 </div>
166 </td>
167 <td>
168 <ul style="margin: 0; padding: 0"><b>Choices:</b>
169 <li>0</li>
170 <li>3</li>
171 </ul>
172 </td>
173 <td>
174 <div>Type 0 (arbitrary 9-octet ESI value)</div>
175 <div>Type 3 (MAC-based ESI value)</div>
176 </td>
177 </tr>
178
179 <tr>
180 <td class="elbow-placeholder"></td>
181 <td colspan="2">
182 <div class="ansibleOptionAnchor" id="parameter-"></div>
183 <b>redundancy</b>
184 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
185 <div style="font-size: small">
186 <span style="color: purple">dictionary</span>
187 </div>
188 </td>
189 <td>
190 </td>
191 <td>
192 <div>Multi-homing redundancy parameters</div>
193 </td>
194 </tr>
195 <tr>
196 <td class="elbow-placeholder"></td>
197 <td class="elbow-placeholder"></td>
198 <td colspan="1">
199 <div class="ansibleOptionAnchor" id="parameter-"></div>
200 <b>all_active</b>
201 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
202 <div style="font-size: small">
203 <span style="color: purple">boolean</span>
204 </div>
205 </td>
206 <td>
207 <ul style="margin: 0; padding: 0"><b>Choices:</b>
208 <li>no</li>
209 <li>yes</li>
210 </ul>
211 </td>
212 <td>
213 <div>Per-flow load-balancing between PEs on same Ethernet Segment</div>
214 </td>
215 </tr>
216 <tr>
217 <td class="elbow-placeholder"></td>
218 <td class="elbow-placeholder"></td>
219 <td colspan="1">
220 <div class="ansibleOptionAnchor" id="parameter-"></div>
221 <b>single_active</b>
222 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
223 <div style="font-size: small">
224 <span style="color: purple">boolean</span>
225 </div>
226 </td>
227 <td>
228 <ul style="margin: 0; padding: 0"><b>Choices:</b>
229 <li>no</li>
230 <li>yes</li>
231 </ul>
232 </td>
233 <td>
234 <div>Per-vlan load-balancing between PEs on same Ethernet Segment</div>
235 </td>
236 </tr>
237
238 <tr>
239 <td class="elbow-placeholder"></td>
240 <td colspan="2">
241 <div class="ansibleOptionAnchor" id="parameter-"></div>
242 <b>segment</b>
243 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
244 <div style="font-size: small">
245 <span style="color: purple">string</span>
246 / <span style="color: red">required</span>
247 </div>
248 </td>
249 <td>
250 </td>
251 <td>
252 <div>L2VPN EVPN Ethernet Segment, l2vpn evpn ethernet-segment 1</div>
253 </td>
254 </tr>
255
256 <tr>
257 <td colspan="3">
258 <div class="ansibleOptionAnchor" id="parameter-"></div>
259 <b>running_config</b>
260 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
261 <div style="font-size: small">
262 <span style="color: purple">string</span>
263 </div>
264 </td>
265 <td>
266 </td>
267 <td>
268 <div>This option is used only with state <em>parsed</em>.</div>
269 <div>The value of this option should be the output received from the IOS device by executing the command <b>show running-config | section ^l2vpn</b>.</div>
270 <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&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
271 </td>
272 </tr>
273 <tr>
274 <td colspan="3">
275 <div class="ansibleOptionAnchor" id="parameter-"></div>
276 <b>state</b>
277 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
278 <div style="font-size: small">
279 <span style="color: purple">string</span>
280 </div>
281 </td>
282 <td>
283 <ul style="margin: 0; padding: 0"><b>Choices:</b>
284 <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
285 <li>replaced</li>
286 <li>overridden</li>
287 <li>deleted</li>
288 <li>rendered</li>
289 <li>gathered</li>
290 <li>purged</li>
291 <li>parsed</li>
292 </ul>
293 </td>
294 <td>
295 <div>The state the configuration should be left in</div>
296 <div>The states <em>rendered</em>, <em>gathered</em> and <em>parsed</em> does not perform any change on the device.</div>
297 <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>
298 <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>
299 <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 command <em>show running-config | section ^l2vpn</em> executed on device. For state <em>parsed</em> active connection to remote host is not required.</div>
300 <div>The state <em>purged</em> negates virtual/logical interfaces that are specified in task from running-config.</div>
301 </td>
302 </tr>
303 </table>
304 <br/>
305
306
307 Notes
308 -----
309
310 .. note::
311 - Tested against Cisco IOSXE Version 17.16.
312 - This module works with connection ``network_cli``. See https://docs.ansible.com/ansible/latest/network/user_guide/platform_ios.html
313 - The module examples uses callback plugin (callback_result_format=yaml) to generate task output in yaml format.
314
315
316
317 Examples
318 --------
319
320 .. code-block:: yaml
321
322 # Using merged
323
324 # Before state:
325 # -------------
326 #
327 # vios#sh running-config | section ^l2vpn evpn ethernet-segment
328 # l2vpn evpn ethernet-segment 1
329 # identifier type 0 00.00.00.00.00.00.00.00.01
330 # redundancy single-active
331 # !
332 # l2vpn evpn ethernet-segment 2
333 # identifier type 0 00.00.00.00.00.00.00.00.02
334 # redundancy single-active
335 # df-election preempt-time 1
336 # !
337 # l2vpn evpn ethernet-segment 3
338 # identifier type 3 system-mac 00.00.00.00.00.00.00.00.03
339 # redundancy single-active
340 # !
341 # l2vpn evpn ethernet-segment 4
342 # identifier type 0 00.00.00.00.00.00.00.00.04
343 # redundancy all-active
344 # df-election wait-time 1
345 # !
346
347 - name: Gather facts of evpn ethernet segment
348 cisco.ios.ios_evpn_ethernet:
349 config:
350 - identifier:
351 identifier_type: '0'
352 esi_value: 00.00.00.00.00.00.00.00.01
353 redundancy:
354 single_active: true
355 segment: '1'
356 - df_election:
357 preempt_time: 1
358 identifier:
359 identifier_type: '0'
360 esi_value: 00.00.00.00.00.00.00.00.02
361 redundancy:
362 single_active: true
363 segment: '2'
364 - identifier:
365 identifier_type: '3'
366 esi_value: 00.00.00.00.00.00.00.00.03
367 redundancy:
368 single_active: true
369 segment: '3'
370 - df_election:
371 wait_time: 1
372 identifier:
373 identifier_type: '0'
374 esi_value: 00.00.00.00.00.00.00.00.04
375 redundancy:
376 all_active: true
377 segment: '4'
378 - df_election:
379 wait_time: 1
380 identifier:
381 identifier_type: '0'
382 esi_value: 00.00.00.00.00.00.00.00.05
383 redundancy:
384 all_active: true
385 segment: '5'
386 state: merged
387
388 # Task Output
389 # -----------
390 #
391 # before:
392 # - identifier:
393 # identifier_type: '0'
394 # esi_value: 00.00.00.00.00.00.00.00.01
395 # redundancy:
396 # single_active: true
397 # segment: '1'
398 # - df_election:
399 # preempt_time: 1
400 # identifier:
401 # identifier_type: '0'
402 # esi_value: 00.00.00.00.00.00.00.00.02
403 # redundancy:
404 # single_active: true
405 # segment: '2'
406 # - identifier:
407 # identifier_type: '3'
408 # esi_value: 00.00.00.00.00.00.00.00.03
409 # redundancy:
410 # single_active: true
411 # segment: '3'
412 # - df_election:
413 # wait_time: 1
414 # identifier:
415 # identifier_type: '0'
416 # esi_value: 00.00.00.00.00.00.00.00.04
417 # redundancy:
418 # all_active: true
419 # segment: '4'
420 # commands:
421 # - l2vpn evpn ethernet-segment 5
422 # - identifier type 0 00.00.00.00.00.00.00.00.05
423 # - redundancy all-active
424 # - df-election wait-time 1
425 # after:
426 # - identifier:
427 # identifier_type: '0'
428 # esi_value: 00.00.00.00.00.00.00.00.01
429 # redundancy:
430 # single_active: true
431 # segment: '1'
432 # - df_election:
433 # preempt_time: 1
434 # identifier:
435 # identifier_type: '0'
436 # esi_value: 00.00.00.00.00.00.00.00.02
437 # redundancy:
438 # single_active: true
439 # segment: '2'
440 # - identifier:
441 # identifier_type: '3'
442 # esi_value: 00.00.00.00.00.00.00.00.03
443 # redundancy:
444 # single_active: true
445 # segment: '3'
446 # - df_election:
447 # wait_time: 1
448 # identifier:
449 # identifier_type: '0'
450 # esi_value: 00.00.00.00.00.00.00.00.04
451 # redundancy:
452 # all_active: true
453 # segment: '4'
454 # - df_election:
455 # wait_time: 1
456 # identifier:
457 # identifier_type: '0'
458 # esi_value: 00.00.00.00.00.00.00.00.05
459 # redundancy:
460 # all_active: true
461 # segment: '5'
462
463 # After state:
464 # -------------
465 #
466 # vios#sh running-config | section ^l2vpn evpn ethernet-segment
467 # l2vpn evpn ethernet-segment 1
468 # identifier type 0 00.00.00.00.00.00.00.00.01
469 # redundancy single-active
470 # !
471 # l2vpn evpn ethernet-segment 2
472 # identifier type 0 00.00.00.00.00.00.00.00.02
473 # redundancy single-active
474 # df-election preempt-time 1
475 # !
476 # l2vpn evpn ethernet-segment 3
477 # identifier type 3 system-mac 00.00.00.00.00.00.00.00.03
478 # redundancy single-active
479 # !
480 # l2vpn evpn ethernet-segment 4
481 # identifier type 0 00.00.00.00.00.00.00.00.04
482 # redundancy all-active
483 # df-election wait-time 1
484 # !
485 # l2vpn evpn ethernet-segment 5
486 # identifier type 0 00.00.00.00.00.00.00.00.05
487 # redundancy all-active
488 # df-election wait-time 1
489 # !
490
491 # Using replaced
492
493 # Before state:
494 # -------------
495 #
496 # vios#sh running-config | section ^l2vpn evpn ethernet-segment
497 # l2vpn evpn ethernet-segment 1
498 # identifier type 0 00.00.00.00.00.00.00.00.01
499 # redundancy single-active
500 # !
501 # l2vpn evpn ethernet-segment 2
502 # identifier type 0 00.00.00.00.00.00.00.00.02
503 # redundancy single-active
504 # df-election preempt-time 1
505 # !
506 # l2vpn evpn ethernet-segment 3
507 # identifier type 3 system-mac 00.00.00.00.00.00.00.00.03
508 # redundancy single-active
509 # !
510 # l2vpn evpn ethernet-segment 4
511 # identifier type 0 00.00.00.00.00.00.00.00.04
512 # redundancy all-active
513 # df-election wait-time 1
514 # !
515
516 - name: Gather facts of evpn ethernet segment
517 cisco.ios.ios_evpn_ethernet:
518 config:
519 - df_election:
520 wait_time: 1
521 identifier:
522 identifier_type: '0'
523 esi_value: 00.00.00.00.00.00.00.00.04
524 redundancy:
525 single_active: true
526 segment: '4'
527 - df_election:
528 wait_time: 1
529 identifier:
530 identifier_type: '0'
531 esi_value: 00.00.00.00.00.00.00.00.05
532 redundancy:
533 all_active: true
534 segment: '5'
535 state: replaced
536
537 # Task Output
538 # -----------
539 #
540 # before:
541 # - identifier:
542 # identifier_type: '0'
543 # esi_value: 00.00.00.00.00.00.00.00.01
544 # redundancy:
545 # single_active: true
546 # segment: '1'
547 # - df_election:
548 # preempt_time: 1
549 # identifier:
550 # identifier_type: '0'
551 # esi_value: 00.00.00.00.00.00.00.00.02
552 # redundancy:
553 # single_active: true
554 # segment: '2'
555 # - identifier:
556 # identifier_type: '3'
557 # esi_value: 00.00.00.00.00.00.00.00.03
558 # redundancy:
559 # single_active: true
560 # segment: '3'
561 # - df_election:
562 # wait_time: 1
563 # identifier:
564 # identifier_type: '0'
565 # esi_value: 00.00.00.00.00.00.00.00.04
566 # redundancy:
567 # all_active: true
568 # segment: '4'
569 # commands:
570 # - l2vpn evpn ethernet-segment 4
571 # - redundancy single-active
572 # - l2vpn evpn ethernet-segment 5
573 # - identifier type 0 00.00.00.00.00.00.00.00.05
574 # - redundancy all-active
575 # - df-election wait-time 1
576 # after:
577 # - identifier:
578 # identifier_type: '0'
579 # esi_value: 00.00.00.00.00.00.00.00.01
580 # redundancy:
581 # single_active: true
582 # segment: '1'
583 # - df_election:
584 # preempt_time: 1
585 # identifier:
586 # identifier_type: '0'
587 # esi_value: 00.00.00.00.00.00.00.00.02
588 # redundancy:
589 # single_active: true
590 # segment: '2'
591 # - identifier:
592 # identifier_type: '3'
593 # esi_value: 00.00.00.00.00.00.00.00.03
594 # redundancy:
595 # single_active: true
596 # segment: '3'
597 # - df_election:
598 # wait_time: 1
599 # identifier:
600 # identifier_type: '0'
601 # esi_value: 00.00.00.00.00.00.00.00.04
602 # redundancy:
603 # single_active: true
604 # segment: '4'
605 # - df_election:
606 # wait_time: 1
607 # identifier:
608 # identifier_type: '0'
609 # esi_value: 00.00.00.00.00.00.00.00.05
610 # redundancy:
611 # all_active: true
612 # segment: '5'
613
614 # After state:
615 # -------------
616 #
617 # vios#sh running-config | section ^l2vpn evpn ethernet-segment
618 # l2vpn evpn ethernet-segment 1
619 # identifier type 0 00.00.00.00.00.00.00.00.01
620 # redundancy single-active
621 # !
622 # l2vpn evpn ethernet-segment 2
623 # identifier type 0 00.00.00.00.00.00.00.00.02
624 # redundancy single-active
625 # df-election preempt-time 1
626 # !
627 # l2vpn evpn ethernet-segment 3
628 # identifier type 3 system-mac 00.00.00.00.00.00.00.00.03
629 # redundancy single-active
630 # !
631 # l2vpn evpn ethernet-segment 4
632 # identifier type 0 00.00.00.00.00.00.00.00.04
633 # redundancy single-active
634 # df-election wait-time 1
635 # !
636 # l2vpn evpn ethernet-segment 5
637 # identifier type 0 00.00.00.00.00.00.00.00.05
638 # redundancy all-active
639 # df-election wait-time 1
640 # !
641
642 # Using overridden
643
644 # Before state:
645 # -------------
646 #
647 # vios#sh running-config | section ^l2vpn evpn ethernet-segment
648 # l2vpn evpn ethernet-segment 1
649 # identifier type 0 00.00.00.00.00.00.00.00.01
650 # redundancy single-active
651 # !
652 # l2vpn evpn ethernet-segment 2
653 # identifier type 0 00.00.00.00.00.00.00.00.02
654 # redundancy single-active
655 # df-election preempt-time 1
656 # !
657 # l2vpn evpn ethernet-segment 3
658 # identifier type 3 system-mac 00.00.00.00.00.00.00.00.03
659 # redundancy single-active
660 # !
661 # l2vpn evpn ethernet-segment 4
662 # identifier type 0 00.00.00.00.00.00.00.00.04
663 # redundancy all-active
664 # df-election wait-time 1
665 # !
666
667 - name: Gather facts of evpn ethernet segment
668 cisco.ios.ios_evpn_ethernet:
669 config:
670 - df_election:
671 wait_time: 1
672 identifier:
673 identifier_type: '0'
674 esi_value: 00.00.00.00.00.00.00.00.04
675 redundancy:
676 single_active: true
677 segment: '4'
678 - df_election:
679 wait_time: 1
680 identifier:
681 identifier_type: '0'
682 esi_value: 00.00.00.00.00.00.00.00.05
683 redundancy:
684 all_active: true
685 segment: '5'
686 state: overridden
687
688 # After state:
689 # -------------
690 #
691 # vios#sh running-config | section ^l2vpn evpn ethernet-segment
692 # l2vpn evpn ethernet-segment 4
693 # identifier type 0 00.00.00.00.00.00.00.00.04
694 # redundancy single-active
695 # df-election wait-time 1
696 # !
697 # l2vpn evpn ethernet-segment 5
698 # identifier type 0 00.00.00.00.00.00.00.00.05
699 # redundancy all-active
700 # df-election wait-time 1
701 # !
702
703 # Using deleted
704
705 # Before state:
706 # -------------
707 #
708 # vios#sh running-config | section ^l2vpn evpn ethernet-segment
709 # l2vpn evpn ethernet-segment 1
710 # identifier type 0 00.00.00.00.00.00.00.00.01
711 # redundancy single-active
712 # !
713 # l2vpn evpn ethernet-segment 2
714 # identifier type 0 00.00.00.00.00.00.00.00.02
715 # redundancy single-active
716 # df-election preempt-time 1
717 # !
718 # l2vpn evpn ethernet-segment 3
719 # identifier type 3 system-mac 00.00.00.00.00.00.00.00.03
720 # redundancy single-active
721 # !
722 # l2vpn evpn ethernet-segment 4
723 # identifier type 0 00.00.00.00.00.00.00.00.04
724 # redundancy all-active
725 # df-election wait-time 1
726 # !
727
728 - name: Gather facts of evpn ethernet segment
729 cisco.ios.ios_evpn_ethernet:
730 config:
731 - identifier:
732 identifier_type: '0'
733 esi_value: 00.00.00.00.00.00.00.00.01
734 redundancy:
735 single_active: true
736 segment: '1'
737 - df_election:
738 preempt_time: 1
739 identifier:
740 identifier_type: '0'
741 esi_value: 00.00.00.00.00.00.00.00.02
742 redundancy:
743 single_active: true
744 segment: '2'
745 state: deleted
746
747 # Task Output
748 # -----------
749 #
750 # before:
751 # - identifier:
752 # identifier_type: '0'
753 # esi_value: 00.00.00.00.00.00.00.00.01
754 # redundancy:
755 # single_active: true
756 # segment: '1'
757 # - df_election:
758 # preempt_time: 1
759 # identifier:
760 # identifier_type: '0'
761 # esi_value: 00.00.00.00.00.00.00.00.02
762 # redundancy:
763 # single_active: true
764 # segment: '2'
765 # - identifier:
766 # identifier_type: '3'
767 # esi_value: 00.00.00.00.00.00.00.00.03
768 # redundancy:
769 # single_active: true
770 # segment: '3'
771 # - df_election:
772 # wait_time: 1
773 # identifier:
774 # identifier_type: '0'
775 # esi_value: 00.00.00.00.00.00.00.00.04
776 # redundancy:
777 # all_active: true
778 # segment: '4'
779 # commands:
780 # - l2vpn evpn ethernet-segment 1
781 # - no identifier type 0 00.00.00.00.00.00.00.00.01
782 # - no redundancy single-active
783 # - l2vpn evpn ethernet-segment 2
784 # - no identifier type 0 00.00.00.00.00.00.00.00.02
785 # - no redundancy single-active
786 # - no df-election wait-time 1
787 # after:
788 # - segment: '1'
789 # - segment: '2'
790 # - identifier:
791 # identifier_type: '3'
792 # esi_value: 00.00.00.00.00.00.00.00.03
793 # redundancy:
794 # single_active: true
795 # segment: '3'
796 # - df_election:
797 # wait_time: 1
798 # identifier:
799 # identifier_type: '0'
800 # esi_value: 00.00.00.00.00.00.00.00.04
801 # redundancy:
802 # all_active: true
803 # segment: '4'
804 # - df_election:
805 # wait_time: 1
806 # identifier:
807 # identifier_type: '0'
808 # esi_value: 00.00.00.00.00.00.00.00.05
809 # redundancy:
810 # all_active: true
811 # segment: '5'
812
813 # After state:
814 # -------------
815 #
816 # vios#sh running-config | section ^l2vpn evpn ethernet-segment
817 # l2vpn evpn ethernet-segment 1
818 # !
819 # l2vpn evpn ethernet-segment 2
820 # !
821 # l2vpn evpn ethernet-segment 3
822 # identifier type 3 system-mac 00.00.00.00.00.00.00.00.03
823 # redundancy single-active
824 # !
825 # l2vpn evpn ethernet-segment 4
826 # identifier type 0 00.00.00.00.00.00.00.00.04
827 # redundancy all-active
828 # df-election wait-time 1
829 # !
830 # l2vpn evpn ethernet-segment 5
831 # identifier type 0 00.00.00.00.00.00.00.00.05
832 # redundancy all-active
833 # df-election wait-time 1
834 # !
835
836 # Using purged
837
838 # Before state:
839 # -------------
840 #
841 # vios#sh running-config | section ^l2vpn evpn ethernet-segment
842 # l2vpn evpn ethernet-segment 1
843 # identifier type 0 00.00.00.00.00.00.00.00.01
844 # redundancy single-active
845 # !
846 # l2vpn evpn ethernet-segment 2
847 # identifier type 0 00.00.00.00.00.00.00.00.02
848 # redundancy single-active
849 # df-election preempt-time 1
850 # !
851 # l2vpn evpn ethernet-segment 3
852 # identifier type 3 system-mac 00.00.00.00.00.00.00.00.03
853 # redundancy single-active
854 # !
855 # l2vpn evpn ethernet-segment 4
856 # identifier type 0 00.00.00.00.00.00.00.00.04
857 # redundancy all-active
858 # df-election wait-time 1
859 # !
860
861 - name: Gather facts of evpn ethernet segment
862 cisco.ios.ios_evpn_ethernet:
863 config:
864 - segment: '1'
865 - segment: '2'
866 state: purged
867
868 # Task Output
869 # -----------
870 #
871 # before:
872 # - identifier:
873 # identifier_type: '0'
874 # esi_value: 00.00.00.00.00.00.00.00.01
875 # redundancy:
876 # single_active: true
877 # segment: '1'
878 # - df_election:
879 # preempt_time: 1
880 # identifier:
881 # identifier_type: '0'
882 # esi_value: 00.00.00.00.00.00.00.00.02
883 # redundancy:
884 # single_active: true
885 # segment: '2'
886 # - identifier:
887 # identifier_type: '3'
888 # esi_value: 00.00.00.00.00.00.00.00.03
889 # redundancy:
890 # single_active: true
891 # segment: '3'
892 # - df_election:
893 # wait_time: 1
894 # identifier:
895 # identifier_type: '0'
896 # esi_value: 00.00.00.00.00.00.00.00.04
897 # redundancy:
898 # all_active: true
899 # segment: '4'
900 # commands:
901 # - no l2vpn evpn ethernet-segment 1
902 # - no l2vpn evpn ethernet-segment 2
903 # after:
904 # - identifier:
905 # identifier_type: '3'
906 # esi_value: 00.00.00.00.00.00.00.00.03
907 # redundancy:
908 # single_active: true
909 # segment: '3'
910 # - df_election:
911 # wait_time: 1
912 # identifier:
913 # identifier_type: '0'
914 # esi_value: 00.00.00.00.00.00.00.00.04
915 # redundancy:
916 # all_active: true
917 # segment: '4'
918 # - df_election:
919 # wait_time: 1
920 # identifier:
921 # identifier_type: '0'
922 # esi_value: 00.00.00.00.00.00.00.00.05
923 # redundancy:
924 # all_active: true
925 # segment: '5'
926
927 # After state:
928 # -------------
929 #
930 # vios#sh running-config | section ^l2vpn evpn ethernet-segment
931 # l2vpn evpn ethernet-segment 3
932 # identifier type 3 system-mac 00.00.00.00.00.00.00.00.03
933 # redundancy single-active
934 # !
935 # l2vpn evpn ethernet-segment 4
936 # identifier type 0 00.00.00.00.00.00.00.00.04
937 # redundancy all-active
938 # df-election wait-time 1
939 # !
940 # l2vpn evpn ethernet-segment 5
941 # identifier type 0 00.00.00.00.00.00.00.00.05
942 # redundancy all-active
943 # df-election wait-time 1
944 # !
945
946 # Using gathered
947
948 # Before state:
949 # -------------
950 #
951 # vios#sh running-config | section ^l2vpn evpn ethernet-segment
952 # l2vpn evpn ethernet-segment 1
953 # identifier type 0 00.00.00.00.00.00.00.00.01
954 # redundancy single-active
955 # !
956 # l2vpn evpn ethernet-segment 2
957 # identifier type 0 00.00.00.00.00.00.00.00.02
958 # redundancy single-active
959 # df-election preempt-time 1
960 # !
961 # l2vpn evpn ethernet-segment 3
962 # identifier type 3 system-mac 00.00.00.00.00.00.00.00.03
963 # redundancy single-active
964 # !
965 # l2vpn evpn ethernet-segment 4
966 # identifier type 0 00.00.00.00.00.00.00.00.04
967 # redundancy all-active
968 # df-election wait-time 1
969 # !
970
971 - name: Gather facts of evpn ethernet segment
972 cisco.ios.ios_evpn_ethernet:
973 config:
974 state: gathered
975
976 # Task Output
977 # -----------
978 #
979 # gathered:
980 # - identifier:
981 # identifier_type: '0'
982 # esi_value: 00.00.00.00.00.00.00.00.01
983 # redundancy:
984 # single_active: true
985 # segment: '1'
986 # - df_election:
987 # preempt_time: 1
988 # identifier:
989 # identifier_type: '0'
990 # esi_value: 00.00.00.00.00.00.00.00.02
991 # redundancy:
992 # single_active: true
993 # segment: '2'
994 # - identifier:
995 # identifier_type: '3'
996 # esi_value: 00.00.00.00.00.00.00.00.03
997 # redundancy:
998 # single_active: true
999 # segment: '3'
1000 # - df_election:
1001 # wait_time: 1
1002 # identifier:
1003 # identifier_type: '0'
1004 # esi_value: 00.00.00.00.00.00.00.00.04
1005 # redundancy:
1006 # all_active: true
1007 # segment: '4'
1008
1009 # Using rendered
1010
1011 - name: Render commands with provided configuration
1012 cisco.ios.ios_evpn_ethernet:
1013 config:
1014 - identifier:
1015 identifier_type: '0'
1016 esi_value: 00.00.00.00.00.00.00.00.01
1017 redundancy:
1018 single_active: true
1019 segment: '1'
1020 - df_election:
1021 preempt_time: 1
1022 identifier:
1023 identifier_type: '0'
1024 esi_value: 00.00.00.00.00.00.00.00.02
1025 redundancy:
1026 single_active: true
1027 segment: '2'
1028 - identifier:
1029 identifier_type: '3'
1030 esi_value: 00.00.00.00.00.00.00.00.03
1031 redundancy:
1032 single_active: true
1033 segment: '3'
1034 - df_election:
1035 wait_time: 1
1036 identifier:
1037 identifier_type: '0'
1038 esi_value: 00.00.00.00.00.00.00.00.04
1039 redundancy:
1040 all_active: true
1041 segment: '4'
1042 state: rendered
1043
1044 # Task Output
1045 # -----------
1046 #
1047 # rendered:
1048 # - l2vpn evpn ethernet-segment 1
1049 # - redundancy single-active
1050 # - identifier type 0 00.00.00.00.00.00.00.00.01
1051 # - l2vpn evpn ethernet-segment 2
1052 # - df-election preempt-time 1
1053 # - redundancy single-active
1054 # - identifier type 0 00.00.00.00.00.00.00.00.02
1055 # - l2vpn evpn ethernet-segment 3
1056 # - redundancy single-active
1057 # - identifier type 3 system-mac 00.00.00.00.00.00.00.00.03
1058 # - l2vpn evpn ethernet-segment 4
1059 # - df-election wait-time 1
1060 # - redundancy all-active
1061 # - identifier type 0 00.00.00.00.00.00.00.00.04
1062
1063 # Using parsed
1064
1065 # File: parsed.cfg
1066 # ----------------
1067 #
1068 # l2vpn evpn ethernet-segment 1
1069 # identifier type 0 00.00.00.00.00.00.00.00.01
1070 # redundancy single-active
1071 # !
1072 # l2vpn evpn ethernet-segment 2
1073 # identifier type 0 00.00.00.00.00.00.00.00.02
1074 # redundancy single-active
1075 # df-election preempt-time 1
1076 # !
1077 # l2vpn evpn ethernet-segment 3
1078 # identifier type 3 system-mac 00.00.00.00.00.00.00.00.03
1079 # redundancy single-active
1080 # !
1081 # l2vpn evpn ethernet-segment 4
1082 # identifier type 0 00.00.00.00.00.00.00.00.04
1083 # redundancy all-active
1084 # df-election wait-time 1
1085 # !
1086
1087 - name: Parse the provided configuration
1088 cisco.ios.ios_evpn_ethernet:
1089 running_config: "{{ lookup('file', 'ios_ethernet_segment_parsed.cfg') }}"
1090 state: parsed
1091
1092 # Task Output
1093 # -----------
1094 #
1095 # parsed:
1096 # - identifier:
1097 # identifier_type: '0'
1098 # esi_value: 00.00.00.00.00.00.00.00.01
1099 # redundancy:
1100 # single_active: true
1101 # segment: '1'
1102 # - df_election:
1103 # preempt_time: 1
1104 # identifier:
1105 # identifier_type: '0'
1106 # esi_value: 00.00.00.00.00.00.00.00.02
1107 # redundancy:
1108 # single_active: true
1109 # segment: '2'
1110 # - identifier:
1111 # identifier_type: '3'
1112 # esi_value: 00.00.00.00.00.00.00.00.03
1113 # redundancy:
1114 # single_active: true
1115 # segment: '3'
1116 # - df_election:
1117 # wait_time: 1
1118 # identifier:
1119 # identifier_type: '0'
1120 # esi_value: 00.00.00.00.00.00.00.00.04
1121 # redundancy:
1122 # all_active: true
1123 # segment: '4'
1124
1125
1126
1127 Return Values
1128 -------------
1129 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:
1130
1131 .. raw:: html
1132
1133 <table border=0 cellpadding=0 class="documentation-table">
1134 <tr>
1135 <th colspan="1">Key</th>
1136 <th>Returned</th>
1137 <th width="100%">Description</th>
1138 </tr>
1139 <tr>
1140 <td colspan="1">
1141 <div class="ansibleOptionAnchor" id="return-"></div>
1142 <b>after</b>
1143 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
1144 <div style="font-size: small">
1145 <span style="color: purple">list</span>
1146 </div>
1147 </td>
1148 <td>when changed</td>
1149 <td>
1150 <div>The resulting configuration after module execution.</div>
1151 <br/>
1152 <div style="font-size: smaller"><b>Sample:</b></div>
1153 <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>
1154 </td>
1155 </tr>
1156 <tr>
1157 <td colspan="1">
1158 <div class="ansibleOptionAnchor" id="return-"></div>
1159 <b>before</b>
1160 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
1161 <div style="font-size: small">
1162 <span style="color: purple">list</span>
1163 </div>
1164 </td>
1165 <td>when <em>state</em> is <code>merged</code>, <code>replaced</code>, <code>overridden</code>, <code>deleted</code> or <code>purged</code></td>
1166 <td>
1167 <div>The configuration prior to the module execution.</div>
1168 <br/>
1169 <div style="font-size: smaller"><b>Sample:</b></div>
1170 <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>
1171 </td>
1172 </tr>
1173 <tr>
1174 <td colspan="1">
1175 <div class="ansibleOptionAnchor" id="return-"></div>
1176 <b>commands</b>
1177 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
1178 <div style="font-size: small">
1179 <span style="color: purple">list</span>
1180 </div>
1181 </td>
1182 <td>when <em>state</em> is <code>merged</code>, <code>replaced</code>, <code>overridden</code>, <code>deleted</code> or <code>purged</code></td>
1183 <td>
1184 <div>The set of commands pushed to the remote device.</div>
1185 <br/>
1186 <div style="font-size: smaller"><b>Sample:</b></div>
1187 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;l2vpn evpn ethernet-segment 1&#x27;, &#x27;identifier type 0 00.00.00.00.00.00.00.00.01&#x27;, &#x27;redundancy single-active&#x27;]</div>
1188 </td>
1189 </tr>
1190 <tr>
1191 <td colspan="1">
1192 <div class="ansibleOptionAnchor" id="return-"></div>
1193 <b>gathered</b>
1194 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
1195 <div style="font-size: small">
1196 <span style="color: purple">list</span>
1197 </div>
1198 </td>
1199 <td>when <em>state</em> is <code>gathered</code></td>
1200 <td>
1201 <div>Facts about the network resource gathered from the remote device as structured data.</div>
1202 <br/>
1203 <div style="font-size: smaller"><b>Sample:</b></div>
1204 <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>
1205 </td>
1206 </tr>
1207 <tr>
1208 <td colspan="1">
1209 <div class="ansibleOptionAnchor" id="return-"></div>
1210 <b>parsed</b>
1211 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
1212 <div style="font-size: small">
1213 <span style="color: purple">list</span>
1214 </div>
1215 </td>
1216 <td>when <em>state</em> is <code>parsed</code></td>
1217 <td>
1218 <div>The device native config provided in <em>running_config</em> option parsed into structured data as per module argspec.</div>
1219 <br/>
1220 <div style="font-size: smaller"><b>Sample:</b></div>
1221 <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>
1222 </td>
1223 </tr>
1224 <tr>
1225 <td colspan="1">
1226 <div class="ansibleOptionAnchor" id="return-"></div>
1227 <b>rendered</b>
1228 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
1229 <div style="font-size: small">
1230 <span style="color: purple">list</span>
1231 </div>
1232 </td>
1233 <td>when <em>state</em> is <code>rendered</code></td>
1234 <td>
1235 <div>The provided configuration in the task rendered in device-native format (offline).</div>
1236 <br/>
1237 <div style="font-size: smaller"><b>Sample:</b></div>
1238 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;l2vpn evpn ethernet-segment 1&#x27;, &#x27;identifier type 3 system-mac 0000.0000.0000.0001&#x27;, &#x27;redundancy all-active&#x27;]</div>
1239 </td>
1240 </tr>
1241 </table>
1242 <br/><br/>
1243
1244
1245 Status
1246 ------
1247
1248
1249 Authors
1250 ~~~~~~~
1251
1252 - Sagar Paul (@KB-perByte)
1253 - Jorgen Spange (@jorgenspange)