Debian Codegraph @

ansible_collections/cisco/ios/docs/cisco.ios.ios_bfd_interfaces_module.rst

raw
1 .. _cisco.ios.ios_bfd_interfaces_module:
2
3
4 ****************************
5 cisco.ios.ios_bfd_interfaces
6 ****************************
7
8 **Resource module to configure bfd in interfaces.**
9
10
11 Version added: 11.3.0
12
13 .. contents::
14 :local:
15 :depth: 1
16
17
18 Synopsis
19 --------
20 - This module manages the bfd configuration in interface 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 list of interface options, to configure bfd.</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>bfd</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>Enable or disable bfd for the interface.</div>
70 <div>Default value for appliance might impact idempotency.</div>
71 </td>
72 </tr>
73 <tr>
74 <td class="elbow-placeholder"></td>
75 <td colspan="2">
76 <div class="ansibleOptionAnchor" id="parameter-"></div>
77 <b>echo</b>
78 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
79 <div style="font-size: small">
80 <span style="color: purple">boolean</span>
81 </div>
82 </td>
83 <td>
84 <ul style="margin: 0; padding: 0"><b>Choices:</b>
85 <li>no</li>
86 <li>yes</li>
87 </ul>
88 </td>
89 <td>
90 <div>Use echo adjunct as bfd detection mechanism.</div>
91 </td>
92 </tr>
93 <tr>
94 <td class="elbow-placeholder"></td>
95 <td colspan="2">
96 <div class="ansibleOptionAnchor" id="parameter-"></div>
97 <b>interval</b>
98 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
99 <div style="font-size: small">
100 <span style="color: purple">dictionary</span>
101 </div>
102 </td>
103 <td>
104 </td>
105 <td>
106 <div>Transmit interval between BFD packets</div>
107 </td>
108 </tr>
109 <tr>
110 <td class="elbow-placeholder"></td>
111 <td class="elbow-placeholder"></td>
112 <td colspan="1">
113 <div class="ansibleOptionAnchor" id="parameter-"></div>
114 <b>input</b>
115 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
116 <div style="font-size: small">
117 <span style="color: purple">integer</span>
118 </div>
119 </td>
120 <td>
121 </td>
122 <td>
123 <div>Interval between transmitted BFD control packets 50 - 9999 Milliseconds</div>
124 </td>
125 </tr>
126 <tr>
127 <td class="elbow-placeholder"></td>
128 <td class="elbow-placeholder"></td>
129 <td colspan="1">
130 <div class="ansibleOptionAnchor" id="parameter-"></div>
131 <b>min_rx</b>
132 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
133 <div style="font-size: small">
134 <span style="color: purple">integer</span>
135 </div>
136 </td>
137 <td>
138 </td>
139 <td>
140 <div>Minimum receive interval capability 50 - 9999 Milliseconds</div>
141 </td>
142 </tr>
143 <tr>
144 <td class="elbow-placeholder"></td>
145 <td class="elbow-placeholder"></td>
146 <td colspan="1">
147 <div class="ansibleOptionAnchor" id="parameter-"></div>
148 <b>multiplier</b>
149 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
150 <div style="font-size: small">
151 <span style="color: purple">integer</span>
152 </div>
153 </td>
154 <td>
155 </td>
156 <td>
157 <div>Detection multiplier 3 - 50</div>
158 </td>
159 </tr>
160
161 <tr>
162 <td class="elbow-placeholder"></td>
163 <td colspan="2">
164 <div class="ansibleOptionAnchor" id="parameter-"></div>
165 <b>jitter</b>
166 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
167 <div style="font-size: small">
168 <span style="color: purple">boolean</span>
169 </div>
170 </td>
171 <td>
172 <ul style="margin: 0; padding: 0"><b>Choices:</b>
173 <li>no</li>
174 <li>yes</li>
175 </ul>
176 </td>
177 <td>
178 <div>Enable BFD interval transmit jittering.</div>
179 </td>
180 </tr>
181 <tr>
182 <td class="elbow-placeholder"></td>
183 <td colspan="2">
184 <div class="ansibleOptionAnchor" id="parameter-"></div>
185 <b>local_address</b>
186 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
187 <div style="font-size: small">
188 <span style="color: purple">string</span>
189 </div>
190 </td>
191 <td>
192 </td>
193 <td>
194 <div>BFD local address.</div>
195 </td>
196 </tr>
197 <tr>
198 <td class="elbow-placeholder"></td>
199 <td colspan="2">
200 <div class="ansibleOptionAnchor" id="parameter-"></div>
201 <b>name</b>
202 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
203 <div style="font-size: small">
204 <span style="color: purple">string</span>
205 / <span style="color: red">required</span>
206 </div>
207 </td>
208 <td>
209 </td>
210 <td>
211 <div>Full name of interface, e.g. GigabitEthernet0/2, loopback999.</div>
212 <div>Short interface names like Gi0/2, Lo999 may impact idempotency.</div>
213 </td>
214 </tr>
215 <tr>
216 <td class="elbow-placeholder"></td>
217 <td colspan="2">
218 <div class="ansibleOptionAnchor" id="parameter-"></div>
219 <b>template</b>
220 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
221 <div style="font-size: small">
222 <span style="color: purple">string</span>
223 </div>
224 </td>
225 <td>
226 </td>
227 <td>
228 <div>BFD template (might impact other BFD configuration),</div>
229 <div>Ansible won&#x27;t guarantee state operations.</div>
230 </td>
231 </tr>
232
233 <tr>
234 <td colspan="3">
235 <div class="ansibleOptionAnchor" id="parameter-"></div>
236 <b>running_config</b>
237 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
238 <div style="font-size: small">
239 <span style="color: purple">string</span>
240 </div>
241 </td>
242 <td>
243 </td>
244 <td>
245 <div>This option is used only with state <em>parsed</em>.</div>
246 <div>The value of this option should be the output received from the IOS XE device by executing the command <b>show running-config | section ^interface</b>.</div>
247 <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>
248 </td>
249 </tr>
250 <tr>
251 <td colspan="3">
252 <div class="ansibleOptionAnchor" id="parameter-"></div>
253 <b>state</b>
254 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
255 <div style="font-size: small">
256 <span style="color: purple">string</span>
257 </div>
258 </td>
259 <td>
260 <ul style="margin: 0; padding: 0"><b>Choices:</b>
261 <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
262 <li>replaced</li>
263 <li>overridden</li>
264 <li>deleted</li>
265 <li>rendered</li>
266 <li>gathered</li>
267 <li>parsed</li>
268 </ul>
269 </td>
270 <td>
271 <div>The state the configuration should be left in</div>
272 <div>The states <em>rendered</em>, <em>gathered</em> and <em>parsed</em> does not perform any change on the device.</div>
273 <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>
274 <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>
275 <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 interface</em> executed on device. For state <em>parsed</em> active connection to remote host is not required.</div>
276 </td>
277 </tr>
278 </table>
279 <br/>
280
281
282 Notes
283 -----
284
285 .. note::
286 - Tested against Cisco IOSXE Version 17.3 on CML.
287 - This module works with connection ``network_cli``. See https://docs.ansible.com/ansible/latest/network/user_guide/platform_ios.html
288 - The module examples uses callback plugin (stdout_callback = yaml) to generate task output in yaml format.
289
290
291
292 Examples
293 --------
294
295 .. code-block:: yaml
296
297 # Using state: merged
298
299 # Before state:
300 # -------------
301
302 # router-ios#show running-config | section ^interface
303 # interface GigabitEthernet1
304 # ip address dhcp
305 # negotiation auto
306 # interface GigabitEthernet2
307 # no ip address
308 # shutdown
309 # negotiation auto
310 # interface GigabitEthernet3
311 # no ip address
312 # shutdown
313 # negotiation auto
314 # interface GigabitEthernet4
315 # no ip address
316 # shutdown
317 # negotiation auto
318
319
320 - name: Apply the provided BFD configuration to interfaces
321 cisco.ios.ios_bfd_interfaces:
322 config:
323 - name: GigabitEthernet1
324 bfd: true
325 jitter: false
326 interval:
327 input: 100
328 min_rx: 100
329 multiplier: 3
330 local_address: 10.0.1.2
331 template: ANSIBLE
332 - name: GigabitEthernet2
333 bfd: true
334 jitter: true
335 interval:
336 input: 100
337 min_rx: 100
338 multiplier: 3
339 - name: GigabitEthernet4
340 template: ANSIBLE_Tempalte
341 state: merged
342
343 # Commands Fired:
344 # ---------------
345
346 # after:
347 # - interval:
348 # input: 100
349 # min_rx: 100
350 # multiplier: 3
351 # jitter: false
352 # local_address: 10.0.1.2
353 # name: GigabitEthernet1
354 # - interval:
355 # input: 100
356 # min_rx: 100
357 # multiplier: 3
358 # name: GigabitEthernet2
359 # - name: GigabitEthernet3
360 # - name: GigabitEthernet4
361 # template: ANSIBLE_Tempalte
362 # before:
363 # - name: GigabitEthernet1
364 # - name: GigabitEthernet2
365 # - name: GigabitEthernet3
366 # - name: GigabitEthernet4
367 # changed: true
368 # commands:
369 # - interface GigabitEthernet1
370 # - bfd enable
371 # - bfd local-address 10.0.1.2
372 # - bfd interval 100 min_rx 100 multiplier 3
373 # - bfd template ANSIBLE
374 # - no bfd jitter
375 # - interface GigabitEthernet2
376 # - bfd enable
377 # - bfd jitter
378 # - bfd interval 100 min_rx 100 multiplier 3
379 # - interface GigabitEthernet4
380 # - bfd template ANSIBLE_Tempalte
381
382 # After state:
383 # ------------
384
385 # router-ios#show running-config | section ^interface
386 # interface GigabitEthernet1
387 # ip address dhcp
388 # negotiation auto
389 # bfd local-address 10.0.1.2
390 # bfd interval 100 min_rx 100 multiplier 3
391 # no bfd jitter
392 # interface GigabitEthernet2
393 # no ip address
394 # shutdown
395 # negotiation auto
396 # bfd interval 100 min_rx 100 multiplier 3
397 # interface GigabitEthernet3
398 # no ip address
399 # shutdown
400 # negotiation auto
401 # interface GigabitEthernet4
402 # no ip address
403 # shutdown
404 # negotiation auto
405 # bfd template ANSIBLE_Tempalte
406
407 # Using state: replaced
408
409 # Before state:
410 # -------------
411
412 # router-ios#show running-config | section ^interface
413 # interface GigabitEthernet1
414 # ip address dhcp
415 # negotiation auto
416 # bfd local-address 10.0.1.2
417 # bfd interval 100 min_rx 100 multiplier 3
418 # no bfd jitter
419 # interface GigabitEthernet2
420 # no ip address
421 # shutdown
422 # negotiation auto
423 # bfd interval 100 min_rx 100 multiplier 3
424 # interface GigabitEthernet3
425 # no ip address
426 # shutdown
427 # negotiation auto
428 # interface GigabitEthernet4
429 # no ip address
430 # shutdown
431 # negotiation auto
432 # bfd template ANSIBLE_Tempalte
433
434
435 - name: Replace BFD configuration for specified interfaces
436 cisco.ios.ios_bfd_interfaces:
437 config:
438 - name: GigabitEthernet1
439 bfd: true
440 echo: true
441 jitter: true
442 interval:
443 input: 100
444 min_rx: 100
445 multiplier: 3
446 local_address: 10.0.1.2
447 template: ANSIBLE
448 - name: GigabitEthernet2
449 bfd: true
450 echo: true
451 jitter: true
452 interval:
453 input: 100
454 min_rx: 100
455 multiplier: 3
456 - name: GigabitEthernet6
457 template: ANSIBLE_3Tempalte
458 state: replaced
459
460 # Commands Fired:
461 # ---------------
462
463 # "commands": [
464 # "interface GigabitEthernet1",
465 # "bfd enable",
466 # "bfd echo",
467 # "bfd jitter",
468 # "bfd local-address 10.0.1.2",
469 # "bfd interval 100 min_rx 100 multiplier 3",
470 # "bfd template ANSIBLE",
471 # "interface GigabitEthernet2",
472 # "bfd enable",
473 # "bfd echo",
474 # "bfd jitter",
475 # "bfd interval 100 min_rx 100 multiplier 3",
476 # "no bfd template OLD_TEMPLATE",
477 # "interface GigabitEthernet6",
478 # "bfd template ANSIBLE_3Tempalte"
479 # ]
480
481 # After state:
482 # ------------
483
484 # router-ios#show running-config | section ^interface
485 # interface GigabitEthernet1
486 # description Ansible UT interface 1
487 # no shutdown
488 # bfd enable
489 # bfd echo
490 # bfd jitter
491 # bfd local-address 10.0.1.2
492 # bfd interval 100 min_rx 100 multiplier 3
493 # bfd template ANSIBLE
494 # interface GigabitEthernet2
495 # description Ansible UT interface 2
496 # ip address dhcp
497 # bfd enable
498 # bfd echo
499 # bfd jitter
500 # bfd interval 100 min_rx 100 multiplier 3
501 # interface GigabitEthernet3
502 # description Ansible UT interface 3
503 # no ip address
504 # shutdown
505 # bfd jitter
506 # bfd local-address 10.0.1.2
507 # bfd interval 50 min_rx 50 multiplier 3
508 # interface GigabitEthernet6
509 # bfd template ANSIBLE_3Tempalte
510
511 # Using state: overridden
512
513 # Before state:
514 # -------------
515
516 # router-ios#show running-config | section ^interface
517 # interface GigabitEthernet1
518 # description Ansible UT interface 1
519 # no shutdown
520 # bfd local-address 10.0.0.1
521 # bfd interval 57 min_rx 66 multiplier 45
522 # interface GigabitEthernet2
523 # description Ansible UT interface 2
524 # ip address dhcp
525 # bfd template OLD_TEMPLATE
526 # interface GigabitEthernet3
527 # description Ansible UT interface 3
528 # no ip address
529 # shutdown
530 # bfd jitter
531 # bfd local-address 10.0.1.2
532 # bfd interval 50 min_rx 50 multiplier 3
533
534 - name: Override all BFD configuration with provided configuration
535 cisco.ios.ios_bfd_interfaces:
536 config:
537 - name: GigabitEthernet1
538 bfd: true
539 echo: true
540 jitter: true
541 interval:
542 input: 100
543 min_rx: 100
544 multiplier: 3
545 local_address: 10.0.1.2
546 template: ANSIBLE
547 - name: GigabitEthernet2
548 bfd: true
549 echo: true
550 jitter: true
551 interval:
552 input: 100
553 min_rx: 100
554 multiplier: 3
555 - name: GigabitEthernet6
556 template: ANSIBLE_3Tempalte
557 state: overridden
558
559 # Commands Fired:
560 # ---------------
561
562 # "commands": [
563 # "interface GigabitEthernet3",
564 # "no bfd jitter",
565 # "no bfd local-address 10.0.1.2",
566 # "no bfd interval 50 min_rx 50 multiplier 3",
567 # "interface GigabitEthernet1",
568 # "bfd enable",
569 # "bfd echo",
570 # "bfd jitter",
571 # "bfd local-address 10.0.1.2",
572 # "bfd interval 100 min_rx 100 multiplier 3",
573 # "bfd template ANSIBLE",
574 # "interface GigabitEthernet2",
575 # "bfd enable",
576 # "bfd echo",
577 # "bfd jitter",
578 # "bfd interval 100 min_rx 100 multiplier 3",
579 # "no bfd template OLD_TEMPLATE",
580 # "interface GigabitEthernet6",
581 # "bfd template ANSIBLE_3Tempalte"
582 # ]
583
584 # After state:
585 # ------------
586
587 # router-ios#show running-config | section ^interface
588 # interface GigabitEthernet1
589 # description Ansible UT interface 1
590 # no shutdown
591 # bfd enable
592 # bfd echo
593 # bfd jitter
594 # bfd local-address 10.0.1.2
595 # bfd interval 100 min_rx 100 multiplier 3
596 # bfd template ANSIBLE
597 # interface GigabitEthernet2
598 # description Ansible UT interface 2
599 # ip address dhcp
600 # bfd enable
601 # bfd echo
602 # bfd jitter
603 # bfd interval 100 min_rx 100 multiplier 3
604 # interface GigabitEthernet3
605 # description Ansible UT interface 3
606 # no ip address
607 # shutdown
608 # interface GigabitEthernet6
609 # bfd template ANSIBLE_3Tempalte
610
611 # Using state: deleted
612
613 # Before state:
614 # -------------
615
616 # router-ios#show running-config | section ^interface
617 # interface GigabitEthernet1
618 # description Ansible UT interface 1
619 # no shutdown
620 # bfd local-address 10.0.0.1
621 # bfd interval 57 min_rx 66 multiplier 45
622 # interface GigabitEthernet2
623 # description Ansible UT interface 2
624 # ip address dhcp
625 # bfd template OLD_TEMPLATE
626 # interface GigabitEthernet3
627 # description Ansible UT interface 3
628 # no ip address
629 # shutdown
630 # bfd jitter
631 # bfd local-address 10.0.1.2
632 # bfd interval 50 min_rx 50 multiplier 3
633
634 - name: Delete BFD configuration for specified interfaces
635 cisco.ios.ios_bfd_interfaces:
636 config:
637 - name: GigabitEthernet1
638 - name: GigabitEthernet2
639 state: deleted
640
641 # Commands Fired:
642 # ---------------
643
644 # "commands": [
645 # "interface GigabitEthernet1",
646 # "no bfd local-address 10.0.0.1",
647 # "no bfd interval 57 min_rx 66 multiplier 45",
648 # "interface GigabitEthernet2",
649 # "no bfd template OLD_TEMPLATE"
650 # ]
651
652 # After state:
653 # ------------
654
655 # router-ios#show running-config | section ^interface
656 # interface GigabitEthernet1
657 # description Ansible UT interface 1
658 # no shutdown
659 # interface GigabitEthernet2
660 # description Ansible UT interface 2
661 # ip address dhcp
662 # interface GigabitEthernet3
663 # description Ansible UT interface 3
664 # no ip address
665 # shutdown
666 # bfd jitter
667 # bfd local-address 10.0.1.2
668 # bfd interval 50 min_rx 50 multiplier 3
669
670 # Using state: gathered
671
672 # Before state:
673 # -------------
674
675 # router-ios#show running-config | section ^interface
676 # interface GigabitEthernet1
677 # description Ansible UT interface 1
678 # no shutdown
679 # bfd local-address 10.0.0.1
680 # bfd interval 57 min_rx 66 multiplier 45
681 # interface GigabitEthernet2
682 # description Ansible UT interface 2
683 # ip address dhcp
684 # bfd template OLD_TEMPLATE
685 # interface GigabitEthernet3
686 # description Ansible UT interface 3
687 # no ip address
688 # shutdown
689 # bfd jitter
690 # bfd local-address 10.0.1.2
691 # bfd interval 50 min_rx 50 multiplier 3
692
693 - name: Gather listed BFD interfaces config
694 cisco.ios.ios_bfd_interfaces:
695 state: gathered
696
697 # Module Execution Result:
698 # ------------------------
699
700 # "gathered": [
701 # {
702 # "name": "GigabitEthernet1",
703 # "local_address": "10.0.0.1",
704 # "interval": {
705 # "input": 57,
706 # "min_rx": 66,
707 # "multiplier": 45
708 # }
709 # },
710 # {
711 # "name": "GigabitEthernet2",
712 # "template": "OLD_TEMPLATE"
713 # },
714 # {
715 # "name": "GigabitEthernet3",
716 # "jitter": true,
717 # "local_address": "10.0.1.2",
718 # "interval": {
719 # "input": 50,
720 # "min_rx": 50,
721 # "multiplier": 3
722 # }
723 # }
724 # ]
725
726 # After state:
727 # -------------
728
729 # router-ios#show running-config | section ^interface
730 # interface GigabitEthernet1
731 # description Ansible UT interface 1
732 # no shutdown
733 # bfd local-address 10.0.0.1
734 # bfd interval 57 min_rx 66 multiplier 45
735 # interface GigabitEthernet2
736 # description Ansible UT interface 2
737 # ip address dhcp
738 # bfd template OLD_TEMPLATE
739 # interface GigabitEthernet3
740 # description Ansible UT interface 3
741 # no ip address
742 # shutdown
743 # bfd jitter
744 # bfd local-address 10.0.1.2
745 # bfd interval 50 min_rx 50 multiplier 3
746
747 # Using state: rendered
748
749 - name: Render the commands for provided configuration
750 cisco.ios.ios_bfd_interfaces:
751 config:
752 - name: GigabitEthernet1
753 local_address: 10.0.0.1
754 interval:
755 input: 57
756 min_rx: 66
757 multiplier: 45
758 - name: GigabitEthernet2
759 template: OLD_TEMPLATE
760 - name: GigabitEthernet3
761 jitter: true
762 local_address: 10.0.1.2
763 interval:
764 input: 50
765 min_rx: 50
766 multiplier: 3
767 state: rendered
768
769 # Module Execution Result:
770 # ------------------------
771
772 # "rendered": [
773 # "interface GigabitEthernet1",
774 # "bfd local-address 10.0.0.1",
775 # "bfd interval 57 min_rx 66 multiplier 45",
776 # "interface GigabitEthernet2",
777 # "bfd template OLD_TEMPLATE",
778 # "interface GigabitEthernet3",
779 # "bfd jitter",
780 # "bfd local-address 10.0.1.2",
781 # "bfd interval 50 min_rx 50 multiplier 3"
782 # ]
783
784 # Using state: parsed
785
786 # File: parsed.cfg
787 # ----------------
788
789 # interface GigabitEthernet1
790 # description Ansible UT interface 1
791 # no shutdown
792 # bfd local-address 10.0.0.1
793 # bfd interval 57 min_rx 66 multiplier 45
794 # interface GigabitEthernet2
795 # description Ansible UT interface 2
796 # ip address dhcp
797 # bfd template OLD_TEMPLATE
798 # interface GigabitEthernet3
799 # description Ansible UT interface 3
800 # no ip address
801 # shutdown
802 # no bfd jitter
803 # bfd local-address 10.0.1.2
804 # bfd interval 50 min_rx 50 multiplier 3
805
806 - name: Parse the provided configuration with the existing running configuration
807 cisco.ios.ios_bfd_interfaces:
808 running_config: "{{ lookup('file', 'parsed.cfg') }}"
809 state: parsed
810
811 # Module Execution Result:
812 # ------------------------
813
814 # "parsed": [
815 # {
816 # "name": "GigabitEthernet1",
817 # "local_address": "10.0.0.1",
818 # "interval": {
819 # "input": 57,
820 # "min_rx": 66,
821 # "multiplier": 45
822 # }
823 # },
824 # {
825 # "name": "GigabitEthernet2",
826 # "template": "OLD_TEMPLATE"
827 # },
828 # {
829 # "name": "GigabitEthernet3",
830 # "jitter": false,
831 # "local_address": "10.0.1.2",
832 # "interval": {
833 # "input": 50,
834 # "min_rx": 50,
835 # "multiplier": 3
836 # }
837 # }
838 # ]
839
840
841
842 Return Values
843 -------------
844 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:
845
846 .. raw:: html
847
848 <table border=0 cellpadding=0 class="documentation-table">
849 <tr>
850 <th colspan="1">Key</th>
851 <th>Returned</th>
852 <th width="100%">Description</th>
853 </tr>
854 <tr>
855 <td colspan="1">
856 <div class="ansibleOptionAnchor" id="return-"></div>
857 <b>after</b>
858 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
859 <div style="font-size: small">
860 <span style="color: purple">list</span>
861 </div>
862 </td>
863 <td>when changed</td>
864 <td>
865 <div>The resulting configuration after module execution.</div>
866 <br/>
867 <div style="font-size: smaller"><b>Sample:</b></div>
868 <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>
869 </td>
870 </tr>
871 <tr>
872 <td colspan="1">
873 <div class="ansibleOptionAnchor" id="return-"></div>
874 <b>before</b>
875 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
876 <div style="font-size: small">
877 <span style="color: purple">list</span>
878 </div>
879 </td>
880 <td>when <em>state</em> is <code>merged</code>, <code>replaced</code>, <code>overridden</code> or <code>deleted</code></td>
881 <td>
882 <div>The configuration prior to the module execution.</div>
883 <br/>
884 <div style="font-size: smaller"><b>Sample:</b></div>
885 <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>
886 </td>
887 </tr>
888 <tr>
889 <td colspan="1">
890 <div class="ansibleOptionAnchor" id="return-"></div>
891 <b>commands</b>
892 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
893 <div style="font-size: small">
894 <span style="color: purple">list</span>
895 </div>
896 </td>
897 <td>when <em>state</em> is <code>merged</code>, <code>replaced</code>, <code>overridden</code> or <code>deleted</code></td>
898 <td>
899 <div>The set of commands pushed to the remote device.</div>
900 <br/>
901 <div style="font-size: smaller"><b>Sample:</b></div>
902 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface GigabitEthernet0/2&#x27;, &#x27;no bfd jitter&#x27;, &#x27;bfd interval 100 min_rx 100 multiplier 3&#x27;]</div>
903 </td>
904 </tr>
905 <tr>
906 <td colspan="1">
907 <div class="ansibleOptionAnchor" id="return-"></div>
908 <b>gathered</b>
909 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
910 <div style="font-size: small">
911 <span style="color: purple">list</span>
912 </div>
913 </td>
914 <td>when <em>state</em> is <code>gathered</code></td>
915 <td>
916 <div>Facts about the network resource gathered from the remote device as structured data.</div>
917 <br/>
918 <div style="font-size: smaller"><b>Sample:</b></div>
919 <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>
920 </td>
921 </tr>
922 <tr>
923 <td colspan="1">
924 <div class="ansibleOptionAnchor" id="return-"></div>
925 <b>parsed</b>
926 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
927 <div style="font-size: small">
928 <span style="color: purple">list</span>
929 </div>
930 </td>
931 <td>when <em>state</em> is <code>parsed</code></td>
932 <td>
933 <div>The device native config provided in <em>running_config</em> option parsed into structured data as per module argspec.</div>
934 <br/>
935 <div style="font-size: smaller"><b>Sample:</b></div>
936 <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>
937 </td>
938 </tr>
939 <tr>
940 <td colspan="1">
941 <div class="ansibleOptionAnchor" id="return-"></div>
942 <b>rendered</b>
943 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
944 <div style="font-size: small">
945 <span style="color: purple">list</span>
946 </div>
947 </td>
948 <td>when <em>state</em> is <code>rendered</code></td>
949 <td>
950 <div>The provided configuration in the task rendered in device-native format (offline).</div>
951 <br/>
952 <div style="font-size: smaller"><b>Sample:</b></div>
953 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface GigabitEthernet0/2&#x27;, &#x27;bfd echo&#x27;, &#x27;bfd jitter&#x27;]</div>
954 </td>
955 </tr>
956 </table>
957 <br/><br/>
958
959
960 Status
961 ------
962
963
964 Authors
965 ~~~~~~~
966
967 - Sagar Paul (@KB-perByte)