Debian Codegraph @

ansible_collections/dellemc/enterprise_sonic/docs/dellemc.enterprise_sonic.sonic_radius_server_module.rst

raw
1 .. _dellemc.enterprise_sonic.sonic_radius_server_module:
2
3
4 ********************************************
5 dellemc.enterprise_sonic.sonic_radius_server
6 ********************************************
7
8 **Manage RADIUS server configuration on SONiC**
9
10
11 Version added: 1.0.0
12
13 .. contents::
14 :local:
15 :depth: 1
16
17
18 Synopsis
19 --------
20 - This module provides configuration management of radius server for devices running Enterprise SONiC.
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">dictionary</span>
43 </div>
44 </td>
45 <td>
46 </td>
47 <td>
48 <div>Specifies the radius server related configuration.</div>
49 </td>
50 </tr>
51 <tr>
52 <td class="elbow-placeholder"></td>
53 <td colspan="3">
54 <div class="ansibleOptionAnchor" id="parameter-"></div>
55 <b>auth_type</b>
56 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
57 <div style="font-size: small">
58 <span style="color: purple">string</span>
59 </div>
60 </td>
61 <td>
62 <ul style="margin: 0; padding: 0"><b>Choices:</b>
63 <li>pap</li>
64 <li>chap</li>
65 <li>mschapv2</li>
66 </ul>
67 </td>
68 <td>
69 <div>Specifies the authentication type of the radius server.</div>
70 <div>The default is <code>pap</code>.</div>
71 </td>
72 </tr>
73 <tr>
74 <td class="elbow-placeholder"></td>
75 <td colspan="3">
76 <div class="ansibleOptionAnchor" id="parameter-"></div>
77 <b>key</b>
78 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
79 <div style="font-size: small">
80 <span style="color: purple">string</span>
81 </div>
82 </td>
83 <td>
84 </td>
85 <td>
86 <div>Specifies the key of the radius server.</div>
87 </td>
88 </tr>
89 <tr>
90 <td class="elbow-placeholder"></td>
91 <td colspan="3">
92 <div class="ansibleOptionAnchor" id="parameter-"></div>
93 <b>nas_ip</b>
94 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
95 <div style="font-size: small">
96 <span style="color: purple">string</span>
97 </div>
98 </td>
99 <td>
100 </td>
101 <td>
102 <div>Specifies the network access server of the radius server.</div>
103 </td>
104 </tr>
105 <tr>
106 <td class="elbow-placeholder"></td>
107 <td colspan="3">
108 <div class="ansibleOptionAnchor" id="parameter-"></div>
109 <b>retransmit</b>
110 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
111 <div style="font-size: small">
112 <span style="color: purple">integer</span>
113 </div>
114 </td>
115 <td>
116 </td>
117 <td>
118 <div>Specifies the re-transmit value of the radius server.</div>
119 <div>The range is 0 to 10.</div>
120 </td>
121 </tr>
122 <tr>
123 <td class="elbow-placeholder"></td>
124 <td colspan="3">
125 <div class="ansibleOptionAnchor" id="parameter-"></div>
126 <b>servers</b>
127 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
128 <div style="font-size: small">
129 <span style="color: purple">dictionary</span>
130 </div>
131 </td>
132 <td>
133 </td>
134 <td>
135 <div>Specifies the servers list of the radius server.</div>
136 </td>
137 </tr>
138 <tr>
139 <td class="elbow-placeholder"></td>
140 <td class="elbow-placeholder"></td>
141 <td colspan="2">
142 <div class="ansibleOptionAnchor" id="parameter-"></div>
143 <b>host</b>
144 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
145 <div style="font-size: small">
146 <span style="color: purple">list</span>
147 / <span style="color: purple">elements=dictionary</span>
148 </div>
149 </td>
150 <td>
151 </td>
152 <td>
153 <div>Specifies the host details of the radius servers list.</div>
154 </td>
155 </tr>
156 <tr>
157 <td class="elbow-placeholder"></td>
158 <td class="elbow-placeholder"></td>
159 <td class="elbow-placeholder"></td>
160 <td colspan="1">
161 <div class="ansibleOptionAnchor" id="parameter-"></div>
162 <b>auth_type</b>
163 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
164 <div style="font-size: small">
165 <span style="color: purple">string</span>
166 </div>
167 </td>
168 <td>
169 <ul style="margin: 0; padding: 0"><b>Choices:</b>
170 <li>pap</li>
171 <li>chap</li>
172 <li>mschapv2</li>
173 </ul>
174 </td>
175 <td>
176 <div>Specifies the authentication type of the radius server host.</div>
177 </td>
178 </tr>
179 <tr>
180 <td class="elbow-placeholder"></td>
181 <td class="elbow-placeholder"></td>
182 <td class="elbow-placeholder"></td>
183 <td colspan="1">
184 <div class="ansibleOptionAnchor" id="parameter-"></div>
185 <b>key</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>Specifies the key of the radius server host.</div>
195 </td>
196 </tr>
197 <tr>
198 <td class="elbow-placeholder"></td>
199 <td class="elbow-placeholder"></td>
200 <td class="elbow-placeholder"></td>
201 <td colspan="1">
202 <div class="ansibleOptionAnchor" id="parameter-"></div>
203 <b>name</b>
204 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
205 <div style="font-size: small">
206 <span style="color: purple">string</span>
207 / <span style="color: red">required</span>
208 </div>
209 </td>
210 <td>
211 </td>
212 <td>
213 <div>Specifies the IP address or name of the radius server host.</div>
214 </td>
215 </tr>
216 <tr>
217 <td class="elbow-placeholder"></td>
218 <td class="elbow-placeholder"></td>
219 <td class="elbow-placeholder"></td>
220 <td colspan="1">
221 <div class="ansibleOptionAnchor" id="parameter-"></div>
222 <b>port</b>
223 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
224 <div style="font-size: small">
225 <span style="color: purple">integer</span>
226 </div>
227 </td>
228 <td>
229 </td>
230 <td>
231 <div>Specifies the port of the radius server host.</div>
232 <div>The range is 1 to 65535.</div>
233 <div>The default is 1812.</div>
234 </td>
235 </tr>
236 <tr>
237 <td class="elbow-placeholder"></td>
238 <td class="elbow-placeholder"></td>
239 <td class="elbow-placeholder"></td>
240 <td colspan="1">
241 <div class="ansibleOptionAnchor" id="parameter-"></div>
242 <b>priority</b>
243 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
244 <div style="font-size: small">
245 <span style="color: purple">integer</span>
246 </div>
247 </td>
248 <td>
249 </td>
250 <td>
251 <div>Specifies the priority of the radius server host.</div>
252 <div>The range is 1 to 64.</div>
253 </td>
254 </tr>
255 <tr>
256 <td class="elbow-placeholder"></td>
257 <td class="elbow-placeholder"></td>
258 <td class="elbow-placeholder"></td>
259 <td colspan="1">
260 <div class="ansibleOptionAnchor" id="parameter-"></div>
261 <b>protocol</b>
262 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
263 <div style="font-size: small">
264 <span style="color: purple">string</span>
265 </div>
266 <div style="font-style: italic; font-size: small; color: darkgreen">added in 4.0.0</div>
267 </td>
268 <td>
269 <ul style="margin: 0; padding: 0"><b>Choices:</b>
270 <li>TLS</li>
271 <li>UDP</li>
272 </ul>
273 </td>
274 <td>
275 <div>Specifies the protocol of the radius server host.</div>
276 <div>The functional default is <code>UDP</code>.</div>
277 </td>
278 </tr>
279 <tr>
280 <td class="elbow-placeholder"></td>
281 <td class="elbow-placeholder"></td>
282 <td class="elbow-placeholder"></td>
283 <td colspan="1">
284 <div class="ansibleOptionAnchor" id="parameter-"></div>
285 <b>retransmit</b>
286 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
287 <div style="font-size: small">
288 <span style="color: purple">integer</span>
289 </div>
290 </td>
291 <td>
292 </td>
293 <td>
294 <div>Specifies the retransmit of the radius server host.</div>
295 <div>The range is 0 to 10.</div>
296 </td>
297 </tr>
298 <tr>
299 <td class="elbow-placeholder"></td>
300 <td class="elbow-placeholder"></td>
301 <td class="elbow-placeholder"></td>
302 <td colspan="1">
303 <div class="ansibleOptionAnchor" id="parameter-"></div>
304 <b>security_profile</b>
305 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
306 <div style="font-size: small">
307 <span style="color: purple">string</span>
308 </div>
309 <div style="font-style: italic; font-size: small; color: darkgreen">added in 4.0.0</div>
310 </td>
311 <td>
312 </td>
313 <td>
314 <div>Specifies the security profile for the radius server host.</div>
315 </td>
316 </tr>
317 <tr>
318 <td class="elbow-placeholder"></td>
319 <td class="elbow-placeholder"></td>
320 <td class="elbow-placeholder"></td>
321 <td colspan="1">
322 <div class="ansibleOptionAnchor" id="parameter-"></div>
323 <b>source_interface</b>
324 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
325 <div style="font-size: small">
326 <span style="color: purple">string</span>
327 </div>
328 </td>
329 <td>
330 </td>
331 <td>
332 <div>Specifies the source interface of the radius server host.</div>
333 </td>
334 </tr>
335 <tr>
336 <td class="elbow-placeholder"></td>
337 <td class="elbow-placeholder"></td>
338 <td class="elbow-placeholder"></td>
339 <td colspan="1">
340 <div class="ansibleOptionAnchor" id="parameter-"></div>
341 <b>timeout</b>
342 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
343 <div style="font-size: small">
344 <span style="color: purple">integer</span>
345 </div>
346 </td>
347 <td>
348 </td>
349 <td>
350 <div>Specifies the timeout of the radius server host.</div>
351 <div>The range is 3 to 60.</div>
352 </td>
353 </tr>
354 <tr>
355 <td class="elbow-placeholder"></td>
356 <td class="elbow-placeholder"></td>
357 <td class="elbow-placeholder"></td>
358 <td colspan="1">
359 <div class="ansibleOptionAnchor" id="parameter-"></div>
360 <b>vrf</b>
361 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
362 <div style="font-size: small">
363 <span style="color: purple">string</span>
364 </div>
365 </td>
366 <td>
367 </td>
368 <td>
369 <div>Specifies the vrf of the radius server host.</div>
370 </td>
371 </tr>
372
373
374 <tr>
375 <td class="elbow-placeholder"></td>
376 <td colspan="3">
377 <div class="ansibleOptionAnchor" id="parameter-"></div>
378 <b>statistics</b>
379 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
380 <div style="font-size: small">
381 <span style="color: purple">boolean</span>
382 </div>
383 </td>
384 <td>
385 <ul style="margin: 0; padding: 0"><b>Choices:</b>
386 <li>no</li>
387 <li>yes</li>
388 </ul>
389 </td>
390 <td>
391 <div>Specifies the statistics flag of the radius server.</div>
392 </td>
393 </tr>
394 <tr>
395 <td class="elbow-placeholder"></td>
396 <td colspan="3">
397 <div class="ansibleOptionAnchor" id="parameter-"></div>
398 <b>timeout</b>
399 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
400 <div style="font-size: small">
401 <span style="color: purple">integer</span>
402 </div>
403 </td>
404 <td>
405 </td>
406 <td>
407 <div>Specifies the timeout of the radius server.</div>
408 <div>The range is 3 to 60.</div>
409 <div>The default is 5.</div>
410 </td>
411 </tr>
412
413 <tr>
414 <td colspan="4">
415 <div class="ansibleOptionAnchor" id="parameter-"></div>
416 <b>state</b>
417 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
418 <div style="font-size: small">
419 <span style="color: purple">string</span>
420 </div>
421 </td>
422 <td>
423 <ul style="margin: 0; padding: 0"><b>Choices:</b>
424 <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
425 <li>replaced</li>
426 <li>overridden</li>
427 <li>deleted</li>
428 </ul>
429 </td>
430 <td>
431 <div>Specifies the operation to be performed on the radius server configured on the device.</div>
432 <div>In case of merged, the input mode configuration will be merged with the existing radius server configuration on the device.</div>
433 <div>In case of deleted the existing radius server mode configuration will be removed from the device.</div>
434 <div>In case of replaced, the existing radius server configuration will be replaced with provided configuration.</div>
435 <div>In case of overridden, the existing radius server configuration will be overridden with the provided configuration.</div>
436 </td>
437 </tr>
438 </table>
439 <br/>
440
441
442 Notes
443 -----
444
445 .. note::
446 - Tested against Enterprise SONiC Distribution by Dell Technologies.
447 - Supports ``check_mode``.
448
449
450
451 Examples
452 --------
453
454 .. code-block:: yaml
455
456 # Using "deleted" state
457 #
458 # Before state:
459 # -------------
460 #
461 # sonic# show running-configuration | grep radius-server
462 # radius-server nas-ip 10.11.12.13
463 # radius-server statistics enable
464 # radius-server timeout 12
465 # radius-server retransmit 5
466 # radius-server auth-type chap
467 # radius-server host 10.10.10.10 protocol TLS security-profile rad-sec-prof
468 # radius-server host my-host1.dell auth-port 55 timeout 12 retransmit 7 auth-type chap priority 3 vrf VrfAnsibleTest source-interface Ethernet100
469
470 - name: Delete specified radius server configuration
471 dellemc.enterprise_sonic.sonic_radius_server:
472 config:
473 auth_type: chap
474 nas_ip: 10.11.12.13
475 timeout: 12
476 servers:
477 host:
478 - name: 10.10.10.10
479 state: deleted
480
481 # After state:
482 # ------------
483 #
484 # sonic# show running-configuration | grep radius-server
485 # radius-server statistics enable
486 # radius-server retransmit 5
487 # radius-server host my-host1.dell auth-port 55 timeout 12 retransmit 7 auth-type chap priority 3 vrf VrfAnsibleTest source-interface Ethernet100
488
489
490 # Using "deleted" state
491 #
492 # Before state:
493 # -------------
494 #
495 # sonic# show running-configuration | grep radius-server
496 # radius-server nas-ip 10.11.12.13
497 # radius-server statistics enable
498 # radius-server timeout 12
499 # radius-server retransmit 5
500 # radius-server auth-type chap
501 # radius-server host 10.10.10.10 protocol TLS security-profile rad-sec-prof
502 # radius-server host my-host1.dell auth-port 55 timeout 12 retransmit 7 auth-type chap priority 3 vrf VrfAnsibleTest source-interface Ethernet100
503
504 - name: Delete all radius server configuration
505 dellemc.enterprise_sonic.sonic_radius_server:
506 config:
507 state: deleted
508
509 # After state:
510 # ------------
511 #
512 # sonic# show running-configuration | grep radius-server
513 # (No radius-server configuration present)
514
515
516 # Using "merged" state
517 #
518 # Before state:
519 # -------------
520 #
521 # sonic# show running-configuration | grep radius-server
522 # (No radius-server configuration present)
523
524 - name: Merge radius server configuration
525 dellemc.enterprise_sonic.sonic_radius_server:
526 config:
527 auth_type: chap
528 timeout: 12
529 nas_ip: 10.11.12.13
530 retransmit: 5
531 statistics: true
532 servers:
533 host:
534 - name: my-host1.dell
535 auth_type: chap
536 priority: 3
537 vrf: VrfAnsibleTest
538 timeout: 12
539 port: 55
540 source_interface: Ethernet100
541 retransmit: 7
542 - name: "10.10.10.10"
543 protocol: "TLS"
544 security_profile: "rad-sec-prof"
545 state: merged
546
547 # After state:
548 # ------------
549 #
550 # sonic# show running-configuration | grep radius-server
551 # radius-server nas-ip 10.11.12.13
552 # radius-server statistics enable
553 # radius-server timeout 12
554 # radius-server retransmit 5
555 # radius-server auth-type chap
556 # radius-server host 10.10.10.10 protocol TLS security-profile rad-sec-prof
557 # radius-server host my-host1.dell auth-port 55 timeout 12 retransmit 7 auth-type chap priority 3 vrf VrfAnsibleTest source-interface Ethernet100
558
559
560 # Using "replaced" state
561 #
562 # Before state:
563 # -------------
564 #
565 # sonic# show running-configuration | grep radius-server
566 # radius-server nas-ip 10.11.12.13
567 # radius-server statistics enable
568 # radius-server timeout 12
569 # radius-server retransmit 5
570 # radius-server auth-type chap
571 # radius-server host 10.10.10.10 protocol TLS security-profile rad-sec-prof
572 # radius-server host my-host1.dell auth-port 55 timeout 12 retransmit 7 auth-type chap priority 3 vrf VrfAnsibleTest source-interface Ethernet100
573
574 - name: Replace specified radius server host configuration
575 sonic_radius_server:
576 config:
577 servers:
578 - host:
579 name: my-host1.dell
580 auth_type: mschapv2
581 source_interface: Ethernet12
582 state: replaced
583
584 # After state:
585 # ------------
586 #
587 # sonic# show running-configuration | grep radius-server
588 # radius-server nas-ip 10.11.12.13
589 # radius-server statistics enable
590 # radius-server timeout 12
591 # radius-server retransmit 5
592 # radius-server auth-type chap
593 # radius-server host 10.10.10.10 protocol TLS security-profile rad-sec-prof
594 # radius-server host my-host1.dell auth-type mschapv2 source-interface Ethernet12
595
596 # Using "overridden" state
597 #
598 # Before state:
599 # -------------
600 #
601 # sonic# show running-configuration | grep radius-server
602 # radius-server nas-ip 10.11.12.13
603 # radius-server statistics enable
604 # radius-server timeout 12
605 # radius-server retransmit 5
606 # radius-server auth-type chap
607 # radius-server host 10.10.10.10 protocol TLS security-profile rad-sec-prof
608 # radius-server host my-host1.dell auth-type mschapv2 source-interface Ethernet12
609
610 - name: Override radius server configuration
611 sonic_radius_server:
612 config:
613 servers:
614 - host:
615 name: 20.20.20.20
616 protocol: TLS
617 security_profile: rad-sec-prof
618 state: overridden
619
620 # After state:
621 # ------------
622 #
623 # sonic# show running-configuration | grep radius-server
624 # radius-server host 20.20.20.20 protocol TLS security-profile rad-sec-prof
625
626
627
628 Return Values
629 -------------
630 Common return values are documented `here <https://docs.ansible.com/projects/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
631
632 .. raw:: html
633
634 <table border=0 cellpadding=0 class="documentation-table">
635 <tr>
636 <th colspan="1">Key</th>
637 <th>Returned</th>
638 <th width="100%">Description</th>
639 </tr>
640 <tr>
641 <td colspan="1">
642 <div class="ansibleOptionAnchor" id="return-"></div>
643 <b>after</b>
644 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
645 <div style="font-size: small">
646 <span style="color: purple">dictionary</span>
647 </div>
648 </td>
649 <td>when changed</td>
650 <td>
651 <div>The resulting configuration module invocation.</div>
652 <br/>
653 </td>
654 </tr>
655 <tr>
656 <td colspan="1">
657 <div class="ansibleOptionAnchor" id="return-"></div>
658 <b>after_generated</b>
659 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
660 <div style="font-size: small">
661 <span style="color: purple">dictionary</span>
662 </div>
663 </td>
664 <td>when <code>check_mode</code></td>
665 <td>
666 <div>The generated configuration from module invocation.</div>
667 <br/>
668 </td>
669 </tr>
670 <tr>
671 <td colspan="1">
672 <div class="ansibleOptionAnchor" id="return-"></div>
673 <b>before</b>
674 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
675 <div style="font-size: small">
676 <span style="color: purple">dictionary</span>
677 </div>
678 </td>
679 <td>always</td>
680 <td>
681 <div>The configuration prior to the module invocation.</div>
682 <br/>
683 </td>
684 </tr>
685 <tr>
686 <td colspan="1">
687 <div class="ansibleOptionAnchor" id="return-"></div>
688 <b>commands</b>
689 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
690 <div style="font-size: small">
691 <span style="color: purple">list</span>
692 </div>
693 </td>
694 <td>always</td>
695 <td>
696 <div>The set of commands pushed to the remote device.</div>
697 <br/>
698 <div style="font-size: smaller"><b>Sample:</b></div>
699 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;command 1&#x27;, &#x27;command 2&#x27;, &#x27;command 3&#x27;]</div>
700 </td>
701 </tr>
702 </table>
703 <br/><br/>
704
705
706 Status
707 ------
708
709
710 Authors
711 ~~~~~~~
712
713 - Niraimadaiselvam M (@niraimadaiselvamm)