Debian Codegraph @

ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_lag_interfaces_module.rst

raw
1 .. _cisco.iosxr.iosxr_lag_interfaces_module:
2
3
4 ********************************
5 cisco.iosxr.iosxr_lag_interfaces
6 ********************************
7
8 **Resource module to configure LAG interfaces.**
9
10
11 Version added: 1.0.0
12
13 .. contents::
14 :local:
15 :depth: 1
16
17
18 Synopsis
19 --------
20 - This module manages the attributes of LAG/Ether-Bundle interfaces on IOS-XR 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 provided Link Aggregation Group (LAG) configuration.</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>links</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>This dict contains configurable options related to LAG/Ether-Bundle links.</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>max_active</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>Specifies the limit on the number of links that can be active in the LAG/Ether-Bundle.</div>
83 <div>Refer to vendor documentation for valid values.</div>
84 </td>
85 </tr>
86 <tr>
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>min_active</b>
92 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
93 <div style="font-size: small">
94 <span style="color: purple">integer</span>
95 </div>
96 </td>
97 <td>
98 </td>
99 <td>
100 <div>Specifies the minimum number of active links needed to bring up the LAG/Ether-Bundle.</div>
101 <div>Refer to vendor documentation for valid values.</div>
102 </td>
103 </tr>
104
105 <tr>
106 <td class="elbow-placeholder"></td>
107 <td colspan="2">
108 <div class="ansibleOptionAnchor" id="parameter-"></div>
109 <b>load_balancing_hash</b>
110 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
111 <div style="font-size: small">
112 <span style="color: purple">string</span>
113 </div>
114 </td>
115 <td>
116 <ul style="margin: 0; padding: 0"><b>Choices:</b>
117 <li>dst-ip</li>
118 <li>src-ip</li>
119 </ul>
120 </td>
121 <td>
122 <div>Specifies the hash function used for traffic forwarded over the LAG/Ether-Bundle.</div>
123 <div>Option &#x27;dst-ip&#x27; uses the destination IP as the hash function.</div>
124 <div>Option &#x27;src-ip&#x27; uses the source IP as the hash function.</div>
125 </td>
126 </tr>
127 <tr>
128 <td class="elbow-placeholder"></td>
129 <td colspan="2">
130 <div class="ansibleOptionAnchor" id="parameter-"></div>
131 <b>members</b>
132 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
133 <div style="font-size: small">
134 <span style="color: purple">list</span>
135 / <span style="color: purple">elements=dictionary</span>
136 </div>
137 </td>
138 <td>
139 </td>
140 <td>
141 <div>List of member interfaces for the LAG/Ether-Bundle.</div>
142 </td>
143 </tr>
144 <tr>
145 <td class="elbow-placeholder"></td>
146 <td class="elbow-placeholder"></td>
147 <td colspan="1">
148 <div class="ansibleOptionAnchor" id="parameter-"></div>
149 <b>member</b>
150 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
151 <div style="font-size: small">
152 <span style="color: purple">string</span>
153 </div>
154 </td>
155 <td>
156 </td>
157 <td>
158 <div>Name of the member interface.</div>
159 </td>
160 </tr>
161 <tr>
162 <td class="elbow-placeholder"></td>
163 <td class="elbow-placeholder"></td>
164 <td colspan="1">
165 <div class="ansibleOptionAnchor" id="parameter-"></div>
166 <b>mode</b>
167 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
168 <div style="font-size: small">
169 <span style="color: purple">string</span>
170 </div>
171 </td>
172 <td>
173 <ul style="margin: 0; padding: 0"><b>Choices:</b>
174 <li>on</li>
175 <li>active</li>
176 <li>passive</li>
177 <li>inherit</li>
178 </ul>
179 </td>
180 <td>
181 <div>Specifies the mode of the operation for the member interface.</div>
182 <div>Mode &#x27;active&#x27; runs LACP in active mode.</div>
183 <div>Mode &#x27;on&#x27; does not run LACP over the port.</div>
184 <div>Mode &#x27;passive&#x27; runs LACP in passive mode over the port.</div>
185 <div>Mode &#x27;inherit&#x27; runs LACP as configured in the bundle.</div>
186 </td>
187 </tr>
188
189 <tr>
190 <td class="elbow-placeholder"></td>
191 <td colspan="2">
192 <div class="ansibleOptionAnchor" id="parameter-"></div>
193 <b>mode</b>
194 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
195 <div style="font-size: small">
196 <span style="color: purple">string</span>
197 </div>
198 </td>
199 <td>
200 <ul style="margin: 0; padding: 0"><b>Choices:</b>
201 <li>on</li>
202 <li>active</li>
203 <li>passive</li>
204 </ul>
205 </td>
206 <td>
207 <div>LAG mode.</div>
208 <div>Mode &#x27;active&#x27; runs LACP in active mode over the port.</div>
209 <div>Mode &#x27;on&#x27; does not run LACP over the port.</div>
210 <div>Mode &#x27;passive&#x27; runs LACP in passive mode over the port.</div>
211 </td>
212 </tr>
213 <tr>
214 <td class="elbow-placeholder"></td>
215 <td colspan="2">
216 <div class="ansibleOptionAnchor" id="parameter-"></div>
217 <b>name</b>
218 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
219 <div style="font-size: small">
220 <span style="color: purple">string</span>
221 / <span style="color: red">required</span>
222 </div>
223 </td>
224 <td>
225 </td>
226 <td>
227 <div>Name/Identifier of the LAG/Ether-Bundle to configure.</div>
228 </td>
229 </tr>
230
231 <tr>
232 <td colspan="3">
233 <div class="ansibleOptionAnchor" id="parameter-"></div>
234 <b>running_config</b>
235 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
236 <div style="font-size: small">
237 <span style="color: purple">string</span>
238 </div>
239 </td>
240 <td>
241 </td>
242 <td>
243 <div>This option is used only with state <em>parsed</em>.</div>
244 <div>The value of this option should be the output received from the IOS-XR device by executing the command <b>show running-config int</b>.</div>
245 <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>
246 </td>
247 </tr>
248 <tr>
249 <td colspan="3">
250 <div class="ansibleOptionAnchor" id="parameter-"></div>
251 <b>state</b>
252 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
253 <div style="font-size: small">
254 <span style="color: purple">string</span>
255 </div>
256 </td>
257 <td>
258 <ul style="margin: 0; padding: 0"><b>Choices:</b>
259 <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
260 <li>replaced</li>
261 <li>overridden</li>
262 <li>deleted</li>
263 <li>parsed</li>
264 <li>rendered</li>
265 <li>gathered</li>
266 </ul>
267 </td>
268 <td>
269 <div>The state of the configuration after module completion.</div>
270 </td>
271 </tr>
272 </table>
273 <br/>
274
275
276 Notes
277 -----
278
279 .. note::
280 - This module works with connection ``network_cli``. See `the IOS-XR Platform Options <../network/user_guide/platform_iosxr.html>`_.
281
282
283
284 Examples
285 --------
286
287 .. code-block:: yaml
288
289 # Using merged
290 #
291 #
292 # ------------
293 # Before state
294 # ------------
295 #
296 # RP/0/0/CPU0:iosxr01#show run int
297 # Sun Jul 7 19:42:59.416 UTC
298 # interface Loopback888
299 # description test for ansible
300 # shutdown
301 # !
302 # interface MgmtEth0/0/CPU0/0
303 # ipv4 address 192.0.2.11 255.255.255.0
304 # !
305 # interface GigabitEthernet0/0/0/1
306 # description "GigabitEthernet - 1"
307 # !
308 # interface GigabitEthernet0/0/0/2
309 # description "GigabitEthernet - 2"
310 # !
311 # interface GigabitEthernet0/0/0/3
312 # description "GigabitEthernet - 3"
313 # !
314 # interface GigabitEthernet0/0/0/4
315 # description "GigabitEthernet - 4"
316 # !
317 #
318 #
319 - name: Merge provided configuration with device configuration
320 cisco.iosxr.iosxr_lag_interfaces:
321 config:
322 - name: Bundle-Ether10
323 members:
324 - member: GigabitEthernet0/0/0/1
325 mode: inherit
326 - member: GigabitEthernet0/0/0/3
327 mode: inherit
328 mode: active
329 links:
330 max_active: 5
331 min_active: 2
332 load_balancing_hash: src-ip
333 - name: Bundle-Ether12
334 members:
335 - member: GigabitEthernet0/0/0/2
336 mode: passive
337 - member: GigabitEthernet0/0/0/4
338 mode: passive
339 load_balancing_hash: dst-ip
340 state: merged
341
342 #
343 #
344 # -----------
345 # After state
346 # -----------
347 #
348 # RP/0/0/CPU0:iosxr01#show run int
349 # Sun Jul 7 20:51:17.685 UTC
350 # interface Bundle-Ether10
351 # lacp mode active
352 # bundle load-balancing hash src-ip
353 # bundle maximum-active links 5
354 # bundle minimum-active links 2
355 # !
356 # interface Bundle-Ether12
357 # bundle load-balancing hash dst-ip
358 # !
359 # interface Loopback888
360 # description test for ansible
361 # shutdown
362 # !
363 # interface MgmtEth0/0/CPU0/0
364 # ipv4 address 192.0.2.11 255.255.255.0
365 # !
366 # interface GigabitEthernet0/0/0/1
367 # description 'GigabitEthernet - 1"
368 # bundle id 10 mode inherit
369 # !
370 # interface GigabitEthernet0/0/0/2
371 # description "GigabitEthernet - 2"
372 # bundle id 12 mode passive
373 # !
374 # interface GigabitEthernet0/0/0/3
375 # description "GigabitEthernet - 3"
376 # bundle id 10 mode inherit
377 # !
378 # interface GigabitEthernet0/0/0/4
379 # description "GigabitEthernet - 4"
380 # bundle id 12 mode passive
381 # !
382 #
383
384
385 # Using replaced
386 #
387 #
388 # -------------
389 # Before state
390 # -------------
391 #
392 #
393 # RP/0/0/CPU0:iosxr01#sho run int
394 # Sun Jul 7 20:58:06.527 UTC
395 # interface Bundle-Ether10
396 # lacp mode active
397 # bundle load-balancing hash src-ip
398 # bundle maximum-active links 5
399 # bundle minimum-active links 2
400 # !
401 # interface Bundle-Ether12
402 # bundle load-balancing hash dst-ip
403 # !
404 # interface Loopback888
405 # description test for ansible
406 # shutdown
407 # !
408 # interface MgmtEth0/0/CPU0/0
409 # ipv4 address 192.0.2.11 255.255.255.0
410 # !
411 # interface GigabitEthernet0/0/0/1
412 # description 'GigabitEthernet - 1"
413 # bundle id 10 mode inherit
414 # !
415 # interface GigabitEthernet0/0/0/2
416 # description "GigabitEthernet - 2"
417 # bundle id 12 mode passive
418 # !
419 # interface GigabitEthernet0/0/0/3
420 # description "GigabitEthernet - 3"
421 # bundle id 10 mode inherit
422 # !
423 # interface GigabitEthernet0/0/0/4
424 # description "GigabitEthernet - 4"
425 # bundle id 12 mode passive
426 # !
427 #
428 #
429 - name: Replace device configuration of listed Bundles with provided configurations
430 cisco.iosxr.iosxr_lag_interfaces:
431 config:
432 - name: Bundle-Ether12
433 members:
434 - name: GigabitEthernet0/0/0/2
435 mode: passive
436 - name: Bundle-Ether11
437 members:
438 - name: GigabitEthernet0/0/0/4
439 load_balancing_hash: src-ip
440 state: replaced
441 #
442 #
443 # -----------
444 # After state
445 # -----------
446 #
447 #
448 # RP/0/0/CPU0:iosxr01#sh run int
449 # Sun Jul 7 21:22:27.397 UTC
450 # interface Bundle-Ether10
451 # lacp mode active
452 # bundle load-balancing hash src-ip
453 # bundle maximum-active links 5
454 # bundle minimum-active links 2
455 # !
456 # interface Bundle-Ether11
457 # bundle load-balancing hash src-ip
458 # !
459 # interface Bundle-Ether12
460 # lacp mode passive
461 # !
462 # interface Loopback888
463 # description test for ansible
464 # shutdown
465 # !
466 # interface MgmtEth0/0/CPU0/0
467 # ipv4 address 192.0.2.11 255.255.255.0
468 # !
469 # interface GigabitEthernet0/0/0/1
470 # description 'GigabitEthernet - 1"
471 # bundle id 10 mode inherit
472 # !
473 # interface GigabitEthernet0/0/0/2
474 # description "GigabitEthernet - 2"
475 # bundle id 12 mode on
476 # !
477 # interface GigabitEthernet0/0/0/3
478 # description "GigabitEthernet - 3"
479 # bundle id 10 mode inherit
480 # !
481 # interface GigabitEthernet0/0/0/4
482 # description "GigabitEthernet - 4"
483 # bundle id 11 mode on
484 # !
485 #
486 #
487
488
489 # Using overridden
490 #
491 #
492 # ------------
493 # Before state
494 # ------------
495 #
496 #
497 # RP/0/0/CPU0:iosxr01#sh run int
498 # Sun Jul 7 21:22:27.397 UTC
499 # interface Bundle-Ether10
500 # lacp mode active
501 # bundle load-balancing hash src-ip
502 # bundle maximum-active links 5
503 # bundle minimum-active links 2
504 # !
505 # interface Bundle-Ether11
506 # bundle load-balancing hash src-ip
507 # !
508 # interface Bundle-Ether12
509 # lacp mode passive
510 # !
511 # interface Loopback888
512 # description test for ansible
513 # shutdown
514 # !
515 # interface MgmtEth0/0/CPU0/0
516 # ipv4 address 192.0.2.11 255.255.255.0
517 # !
518 # interface GigabitEthernet0/0/0/1
519 # description 'GigabitEthernet - 1"
520 # bundle id 10 mode inherit
521 # !
522 # interface GigabitEthernet0/0/0/2
523 # description "GigabitEthernet - 2"
524 # bundle id 12 mode on
525 # !
526 # interface GigabitEthernet0/0/0/3
527 # description "GigabitEthernet - 3"
528 # bundle id 10 mode inherit
529 # !
530 # interface GigabitEthernet0/0/0/4
531 # description "GigabitEthernet - 4"
532 # bundle id 11 mode on
533 # !
534 #
535 #
536
537 - name: Overrides all device configuration with provided configuration
538 cisco.iosxr.iosxr_lag_interfaces:
539 config:
540 - name: Bundle-Ether10
541 members:
542 - member: GigabitEthernet0/0/0/1
543 mode: inherit
544 - member: GigabitEthernet0/0/0/2
545 mode: inherit
546 mode: active
547 load_balancing_hash: dst-ip
548 state: overridden
549
550 #
551 #
552 # ------------
553 # After state
554 # ------------
555 #
556 #
557 # RP/0/0/CPU0:iosxr01#sh run int
558 # Sun Jul 7 21:43:04.802 UTC
559 # interface Bundle-Ether10
560 # lacp mode active
561 # bundle load-balancing hash dst-ip
562 # !
563 # interface Bundle-Ether11
564 # !
565 # interface Bundle-Ether12
566 # !
567 # interface Loopback888
568 # description test for ansible
569 # shutdown
570 # !
571 # interface MgmtEth0/0/CPU0/0
572 # ipv4 address 192.0.2.11 255.255.255.0
573 # !
574 # interface GigabitEthernet0/0/0/1
575 # description 'GigabitEthernet - 1"
576 # bundle id 10 mode inherit
577 # !
578 # interface GigabitEthernet0/0/0/2
579 # description "GigabitEthernet - 2"
580 # bundle id 10 mode inherit
581 # !
582 # interface GigabitEthernet0/0/0/3
583 # description "GigabitEthernet - 3"
584 # !
585 # interface GigabitEthernet0/0/0/4
586 # description "GigabitEthernet - 4"
587 # !
588 #
589 #
590
591
592 # Using deleted
593 #
594 #
595 # ------------
596 # Before state
597 # ------------
598 #
599 # RP/0/0/CPU0:iosxr01#sh run int
600 # Sun Jul 7 21:22:27.397 UTC
601 # interface Bundle-Ether10
602 # lacp mode active
603 # bundle load-balancing hash src-ip
604 # bundle maximum-active links 5
605 # bundle minimum-active links 2
606 # !
607 # interface Bundle-Ether11
608 # bundle load-balancing hash src-ip
609 # !
610 # interface Bundle-Ether12
611 # lacp mode passive
612 # !
613 # interface Loopback888
614 # description test for ansible
615 # shutdown
616 # !
617 # interface MgmtEth0/0/CPU0/0
618 # ipv4 address 192.0.2.11 255.255.255.0
619 # !
620 # interface GigabitEthernet0/0/0/1
621 # description 'GigabitEthernet - 1"
622 # bundle id 10 mode inherit
623 # !
624 # interface GigabitEthernet0/0/0/2
625 # description "GigabitEthernet - 2"
626 # bundle id 12 mode on
627 # !n
628 # interface GigabitEthernet0/0/0/3
629 # description "GigabitEthernet - 3"
630 # bundle id 10 mode inherit
631 # !
632 # interface GigabitEthernet0/0/0/4
633 # description "GigabitEthernet - 4"
634 # bundle id 11 mode on
635 # !
636 #
637 #
638
639 - name: >-
640 Delete attributes of given bundles and removes member interfaces from them
641 (Note - This won't delete the bundles themselves)
642 cisco.iosxr.iosxr_lag_interfaces:
643 config:
644 - name: Bundle-Ether10
645 - name: Bundle-Ether11
646 - name: Bundle-Ether12
647 state: deleted
648
649
650 #
651 #
652 # ------------
653 # After state
654 # ------------
655 #
656 # RP/0/0/CPU0:iosxr01#sh run int
657 # Sun Jul 7 21:49:50.004 UTC
658 # interface Bundle-Ether10
659 # !
660 # interface Bundle-Ether11
661 # !
662 # interface Bundle-Ether12
663 # !
664 # interface Loopback888
665 # description test for ansible
666 # shutdown
667 # !
668 # interface MgmtEth0/0/CPU0/0
669 # ipv4 address 192.0.2.11 255.255.255.0
670 # !
671 # interface GigabitEthernet0/0/0/1
672 # description 'GigabitEthernet - 1"
673 # !
674 # interface GigabitEthernet0/0/0/2
675 # description "GigabitEthernet - 2"
676 # !
677 # interface GigabitEthernet0/0/0/3
678 # description "GigabitEthernet - 3"
679 # !
680 # interface GigabitEthernet0/0/0/4
681 # description "GigabitEthernet - 4"
682 # !
683 #
684 #
685
686 # Using deleted (without config)
687 #
688 #
689 # ------------
690 # Before state
691 # ------------
692 #
693 # RP/0/0/CPU0:an-iosxr#sh run int
694 # Sun Aug 18 19:49:51.908 UTC
695 # interface Bundle-Ether10
696 # lacp mode active
697 # bundle load-balancing hash src-ip
698 # bundle maximum-active links 10
699 # bundle minimum-active links 2
700 # !
701 # interface Bundle-Ether11
702 # bundle load-balancing hash dst-ip
703 # !
704 # interface MgmtEth0/0/CPU0/0
705 # ipv4 address 192.0.2.11 255.255.255.0
706 # !
707 # interface GigabitEthernet0/0/0/0
708 # shutdown
709 # !
710 # interface GigabitEthernet0/0/0/1
711 # bundle id 10 mode inherit
712 # shutdown
713 # !
714 # interface GigabitEthernet0/0/0/2
715 # bundle id 10 mode passive
716 # shutdown
717 # !
718 # interface GigabitEthernet0/0/0/3
719 # bundle id 11 mode passive
720 # shutdown
721 # !
722 # interface GigabitEthernet0/0/0/4
723 # bundle id 11 mode passive
724 # shutdown
725 # !
726 #
727
728 - name: Delete attributes of all bundles and removes member interfaces from them (Note
729 - This won't delete the bundles themselves)
730 cisco.iosxr.iosxr_lag_interfaces:
731 state: deleted
732
733 #
734 #
735 # ------------
736 # After state
737 # ------------
738 #
739 #
740 # RP/0/0/CPU0:an-iosxr#sh run int
741 # Sun Aug 18 19:54:22.389 UTC
742 # interface Bundle-Ether10
743 # !
744 # interface Bundle-Ether11
745 # !
746 # interface MgmtEth0/0/CPU0/0
747 # ipv4 address 10.8.38.69 255.255.255.0
748 # !
749 # interface GigabitEthernet0/0/0/0
750 # shutdown
751 # !
752 # interface GigabitEthernet0/0/0/1
753 # shutdown
754 # !
755 # interface GigabitEthernet0/0/0/2
756 # shutdown
757 # !
758 # interface GigabitEthernet0/0/0/3
759 # shutdown
760 # !
761 # interface GigabitEthernet0/0/0/4
762 # shutdown
763 # !
764
765 # Using parsed:
766
767 # parsed.cfg
768
769 # interface Bundle-Ether10
770 # lacp mode active
771 # bundle load-balancing hash src-ip
772 # bundle maximum-active links 5
773 # bundle minimum-active links 2
774 # !
775 # interface Bundle-Ether12
776 # bundle load-balancing hash dst-ip
777 # !
778 # interface Loopback888
779 # description test for ansible
780 # shutdown
781 # !
782 # interface MgmtEth0/0/CPU0/0
783 # ipv4 address 192.0.2.11 255.255.255.0
784 # !
785 # interface GigabitEthernet0/0/0/1
786 # description 'GigabitEthernet - 1"
787 # bundle id 10 mode inherit
788 # !
789 # interface GigabitEthernet0/0/0/2
790 # description "GigabitEthernet - 2"
791 # bundle id 12 mode passive
792 # !
793 # interface GigabitEthernet0/0/0/3
794 # description "GigabitEthernet - 3"
795 # bundle id 10 mode inherit
796 # !
797 # interface GigabitEthernet0/0/0/4
798 # description "GigabitEthernet - 4"
799 # bundle id 12 mode passive
800 # !
801 #
802 - name: Convert lag interfaces config to argspec without connecting to the appliance
803 cisco.iosxr.iosxr_lag_interfaces:
804 running_config: "{{ lookup('file', './parsed.cfg') }}"
805 state: parsed
806
807 # --------------
808 # Output
809 # --------------
810 # parsed:
811 # - name: Bundle-Ether10
812 # members:
813 # - member: GigabitEthernet0/0/0/1
814 # mode: inherit
815 # - member: GigabitEthernet0/0/0/3
816 # mode: inherit
817 # mode: active
818 # links:
819 # max_active: 5
820 # min_active: 2
821 # load_balancing_hash: src-ip
822
823 # - name: Bundle-Ether12
824 # members:
825 # - member: GigabitEthernet0/0/0/2
826 # mode: passive
827 # - member: GigabitEthernet0/0/0/4
828 # mode: passive
829 # load_balancing_hash: dst-ip
830
831 # using gathered
832
833 # Device Config:
834 # -------------
835
836 # interface Bundle-Ether10
837 # lacp mode active
838 # bundle load-balancing hash src-ip
839 # bundle maximum-active links 5
840 # bundle minimum-active links 2
841 # !
842 # interface Bundle-Ether12
843 # bundle load-balancing hash dst-ip
844 # !
845 # interface Loopback888
846 # description test for ansible
847 # shutdown
848 # !
849 # interface MgmtEth0/0/CPU0/0
850 # ipv4 address 192.0.2.11 255.255.255.0
851 # !
852 # interface GigabitEthernet0/0/0/1
853 # description 'GigabitEthernet - 1"
854 # bundle id 10 mode inherit
855 # !
856 # interface GigabitEthernet0/0/0/2
857 # description "GigabitEthernet - 2"
858 # bundle id 12 mode passive
859 # !
860 # interface GigabitEthernet0/0/0/3
861 # description "GigabitEthernet - 3"
862 # bundle id 10 mode inherit
863 # !
864 # interface GigabitEthernet0/0/0/4
865 # description "GigabitEthernet - 4"
866 # bundle id 12 mode passive
867 # !
868 #
869
870 - name: Gather IOSXR lag interfaces configuration
871 cisco.iosxr.iosxr_lag_interfaces:
872 config:
873 state: gathered
874
875 # --------------
876 # Output
877 # --------------
878 # gathered:
879 # - name: Bundle-Ether10
880 # members:
881 # - member: GigabitEthernet0/0/0/1
882 # mode: inherit
883 # - member: GigabitEthernet0/0/0/3
884 # mode: inherit
885 # mode: active
886 # links:
887 # max_active: 5
888 # min_active: 2
889 # load_balancing_hash: src-ip
890
891 # - name: Bundle-Ether12
892 # members:
893 # - member: GigabitEthernet0/0/0/2
894 # mode: passive
895 # - member: GigabitEthernet0/0/0/4
896 # mode: passive
897 # load_balancing_hash: dst-ip
898
899 # Using rendered:
900 - name: Render platform specific commands from task input using rendered state
901 cisco.iosxr.iosxr_lag_interfaces:
902 config:
903 - name: Bundle-Ether10
904 members:
905 - member: GigabitEthernet0/0/0/1
906 mode: inherit
907 - member: GigabitEthernet0/0/0/3
908 mode: inherit
909 mode: active
910 links:
911 max_active: 5
912 min_active: 2
913 load_balancing_hash: src-ip
914 - name: Bundle-Ether12
915 members:
916 - member: GigabitEthernet0/0/0/2
917 mode: passive
918 - member: GigabitEthernet0/0/0/4
919 mode: passive
920 load_balancing_hash: dst-ip
921 state: rendered
922
923 # Output:
924
925 # rendered:
926 # [
927 # - "interface Bundle-Ether10"
928 # - " lacp mode active"
929 # - " bundle load-balancing hash src-ip"
930 # - " bundle maximum-active links 5"
931 # - " bundle minimum-active links 2"
932 # - "interface Bundle-Ether12"
933 # - " bundle load-balancing hash dst-ip"
934 # - "interface Loopback888"
935 # - " description test for ansible"
936 # - " shutdown"
937 # - "interface MgmtEth0/0/CPU0/0"
938 # - " ipv4 address 192.0.2.11 255.255.255.0"
939 # - "interface GigabitEthernet0/0/0/1"
940 # - " description 'GigabitEthernet - 1""
941 # - " bundle id 10 mode inherit"
942 # - "interface GigabitEthernet0/0/0/2"
943 # - " description "GigabitEthernet - 2""
944 # - " bundle id 12 mode passive"
945 # - "interface GigabitEthernet0/0/0/3"
946 # - " description "GigabitEthernet - 3""
947 # - " bundle id 10 mode inherit"
948 # - "interface GigabitEthernet0/0/0/4"
949 # - " description "GigabitEthernet - 4""
950 # - " bundle id 12 mode passive"
951 # ]
952 #
953
954
955
956 Return Values
957 -------------
958 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:
959
960 .. raw:: html
961
962 <table border=0 cellpadding=0 class="documentation-table">
963 <tr>
964 <th colspan="1">Key</th>
965 <th>Returned</th>
966 <th width="100%">Description</th>
967 </tr>
968 <tr>
969 <td colspan="1">
970 <div class="ansibleOptionAnchor" id="return-"></div>
971 <b>after</b>
972 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
973 <div style="font-size: small">
974 <span style="color: purple">list</span>
975 </div>
976 </td>
977 <td>when changed</td>
978 <td>
979 <div>The configuration as structured data after module completion.</div>
980 <br/>
981 <div style="font-size: smaller"><b>Sample:</b></div>
982 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
983 of the parameters above.</div>
984 </td>
985 </tr>
986 <tr>
987 <td colspan="1">
988 <div class="ansibleOptionAnchor" id="return-"></div>
989 <b>before</b>
990 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
991 <div style="font-size: small">
992 <span style="color: purple">list</span>
993 </div>
994 </td>
995 <td>always</td>
996 <td>
997 <div>The configuration as structured data prior to module invocation.</div>
998 <br/>
999 <div style="font-size: smaller"><b>Sample:</b></div>
1000 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
1001 of the parameters above.</div>
1002 </td>
1003 </tr>
1004 <tr>
1005 <td colspan="1">
1006 <div class="ansibleOptionAnchor" id="return-"></div>
1007 <b>commands</b>
1008 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
1009 <div style="font-size: small">
1010 <span style="color: purple">list</span>
1011 </div>
1012 </td>
1013 <td>always</td>
1014 <td>
1015 <div>The set of commands pushed to the remote device.</div>
1016 <br/>
1017 <div style="font-size: smaller"><b>Sample:</b></div>
1018 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface Bundle-Ether10&#x27;, &#x27;bundle minimum-active links 2&#x27;, &#x27;bundle load-balancing hash src-ip&#x27;]</div>
1019 </td>
1020 </tr>
1021 </table>
1022 <br/><br/>
1023
1024
1025 Status
1026 ------
1027
1028
1029 Authors
1030 ~~~~~~~
1031
1032 - Nilashish Chakraborty (@NilashishC)