Debian Codegraph @

ansible_collections/dellemc/enterprise_sonic/docs/dellemc.enterprise_sonic.sonic_tacacs_server_module.rst

raw
1 .. _dellemc.enterprise_sonic.sonic_tacacs_server_module:
2
3
4 ********************************************
5 dellemc.enterprise_sonic.sonic_tacacs_server
6 ********************************************
7
8 **Manage TACACS server and its parameters**
9
10
11 Version added: 1.1.0
12
13 .. contents::
14 :local:
15 :depth: 1
16
17
18 Synopsis
19 --------
20 - This module provides configuration management of tacacs server parameters on 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 tacacs 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><div style="color: blue"><b>pap</b>&nbsp;&larr;</div></li>
64 <li>chap</li>
65 <li>mschap</li>
66 <li>login</li>
67 </ul>
68 </td>
69 <td>
70 <div>Specifies the authentication type of the tacacs server.</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 tacacs 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>servers</b>
94 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
95 <div style="font-size: small">
96 <span style="color: purple">dictionary</span>
97 </div>
98 </td>
99 <td>
100 </td>
101 <td>
102 <div>Specifies the servers list of the tacacs server.</div>
103 </td>
104 </tr>
105 <tr>
106 <td class="elbow-placeholder"></td>
107 <td class="elbow-placeholder"></td>
108 <td colspan="2">
109 <div class="ansibleOptionAnchor" id="parameter-"></div>
110 <b>host</b>
111 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
112 <div style="font-size: small">
113 <span style="color: purple">list</span>
114 / <span style="color: purple">elements=dictionary</span>
115 </div>
116 </td>
117 <td>
118 </td>
119 <td>
120 <div>Specifies the host details of the tacacs servers list.</div>
121 </td>
122 </tr>
123 <tr>
124 <td class="elbow-placeholder"></td>
125 <td class="elbow-placeholder"></td>
126 <td class="elbow-placeholder"></td>
127 <td colspan="1">
128 <div class="ansibleOptionAnchor" id="parameter-"></div>
129 <b>auth_type</b>
130 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
131 <div style="font-size: small">
132 <span style="color: purple">string</span>
133 </div>
134 </td>
135 <td>
136 <ul style="margin: 0; padding: 0"><b>Choices:</b>
137 <li><div style="color: blue"><b>pap</b>&nbsp;&larr;</div></li>
138 <li>chap</li>
139 <li>mschap</li>
140 <li>login</li>
141 </ul>
142 </td>
143 <td>
144 <div>Specifies the authentication type of the tacacs server host.</div>
145 </td>
146 </tr>
147 <tr>
148 <td class="elbow-placeholder"></td>
149 <td class="elbow-placeholder"></td>
150 <td class="elbow-placeholder"></td>
151 <td colspan="1">
152 <div class="ansibleOptionAnchor" id="parameter-"></div>
153 <b>key</b>
154 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
155 <div style="font-size: small">
156 <span style="color: purple">string</span>
157 </div>
158 </td>
159 <td>
160 </td>
161 <td>
162 <div>Specifies the key of the tacacs server host.</div>
163 </td>
164 </tr>
165 <tr>
166 <td class="elbow-placeholder"></td>
167 <td class="elbow-placeholder"></td>
168 <td class="elbow-placeholder"></td>
169 <td colspan="1">
170 <div class="ansibleOptionAnchor" id="parameter-"></div>
171 <b>name</b>
172 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
173 <div style="font-size: small">
174 <span style="color: purple">string</span>
175 </div>
176 </td>
177 <td>
178 </td>
179 <td>
180 <div>Specifies the name of the tacacs server host.</div>
181 </td>
182 </tr>
183 <tr>
184 <td class="elbow-placeholder"></td>
185 <td class="elbow-placeholder"></td>
186 <td class="elbow-placeholder"></td>
187 <td colspan="1">
188 <div class="ansibleOptionAnchor" id="parameter-"></div>
189 <b>port</b>
190 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
191 <div style="font-size: small">
192 <span style="color: purple">integer</span>
193 </div>
194 </td>
195 <td>
196 <b>Default:</b><br/><div style="color: blue">49</div>
197 </td>
198 <td>
199 <div>Specifies the port of the tacacs server host.</div>
200 </td>
201 </tr>
202 <tr>
203 <td class="elbow-placeholder"></td>
204 <td class="elbow-placeholder"></td>
205 <td class="elbow-placeholder"></td>
206 <td colspan="1">
207 <div class="ansibleOptionAnchor" id="parameter-"></div>
208 <b>priority</b>
209 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
210 <div style="font-size: small">
211 <span style="color: purple">integer</span>
212 </div>
213 </td>
214 <td>
215 <b>Default:</b><br/><div style="color: blue">1</div>
216 </td>
217 <td>
218 <div>Specifies the priority of the tacacs server host.</div>
219 </td>
220 </tr>
221 <tr>
222 <td class="elbow-placeholder"></td>
223 <td class="elbow-placeholder"></td>
224 <td class="elbow-placeholder"></td>
225 <td colspan="1">
226 <div class="ansibleOptionAnchor" id="parameter-"></div>
227 <b>timeout</b>
228 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
229 <div style="font-size: small">
230 <span style="color: purple">integer</span>
231 </div>
232 </td>
233 <td>
234 <b>Default:</b><br/><div style="color: blue">5</div>
235 </td>
236 <td>
237 <div>Specifies the timeout of the tacacs server host.</div>
238 </td>
239 </tr>
240 <tr>
241 <td class="elbow-placeholder"></td>
242 <td class="elbow-placeholder"></td>
243 <td class="elbow-placeholder"></td>
244 <td colspan="1">
245 <div class="ansibleOptionAnchor" id="parameter-"></div>
246 <b>vrf</b>
247 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
248 <div style="font-size: small">
249 <span style="color: purple">string</span>
250 </div>
251 </td>
252 <td>
253 <b>Default:</b><br/><div style="color: blue">"default"</div>
254 </td>
255 <td>
256 <div>Specifies the vrf of the tacacs server host.</div>
257 </td>
258 </tr>
259
260
261 <tr>
262 <td class="elbow-placeholder"></td>
263 <td colspan="3">
264 <div class="ansibleOptionAnchor" id="parameter-"></div>
265 <b>source_interface</b>
266 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
267 <div style="font-size: small">
268 <span style="color: purple">string</span>
269 </div>
270 </td>
271 <td>
272 </td>
273 <td>
274 <div>Specifies the source interface of the tacacs server.</div>
275 </td>
276 </tr>
277 <tr>
278 <td class="elbow-placeholder"></td>
279 <td colspan="3">
280 <div class="ansibleOptionAnchor" id="parameter-"></div>
281 <b>timeout</b>
282 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
283 <div style="font-size: small">
284 <span style="color: purple">integer</span>
285 </div>
286 </td>
287 <td>
288 <b>Default:</b><br/><div style="color: blue">5</div>
289 </td>
290 <td>
291 <div>Specifies the timeout of the tacacs server.</div>
292 </td>
293 </tr>
294
295 <tr>
296 <td colspan="4">
297 <div class="ansibleOptionAnchor" id="parameter-"></div>
298 <b>state</b>
299 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
300 <div style="font-size: small">
301 <span style="color: purple">string</span>
302 </div>
303 </td>
304 <td>
305 <ul style="margin: 0; padding: 0"><b>Choices:</b>
306 <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
307 <li>replaced</li>
308 <li>overridden</li>
309 <li>deleted</li>
310 </ul>
311 </td>
312 <td>
313 <div>Specifies the operation to be performed on the tacacs server configured on the device.</div>
314 <div>In case of merged, the input mode configuration will be merged with the existing tacacs server configuration on the device.</div>
315 <div>In case of deleted the existing tacacs server mode configuration will be removed from the device.</div>
316 <div>In case of replaced, the existing tacacs server configuration will be replaced with provided configuration.</div>
317 <div>In case of overridden, the existing tacacs server configuration will be overridden with the provided configuration.</div>
318 </td>
319 </tr>
320 </table>
321 <br/>
322
323
324 Notes
325 -----
326
327 .. note::
328 - Tested against Enterprise SONiC Distribution by Dell Technologies.
329 - Supports ``check_mode``.
330
331
332
333 Examples
334 --------
335
336 .. code-block:: yaml
337
338 # Using "deleted" state
339 #
340 # Before state:
341 # -------------
342 #
343 # do show tacacs-server
344 # ---------------------------------------------------------
345 # TACACS Global Configuration
346 # ---------------------------------------------------------
347 # source-interface : Ethernet12
348 # timeout : 10
349 # auth-type : login
350 # key : login
351 # ------------------------------------------------------------------------------------------------
352 # HOST AUTH-TYPE KEY PORT PRIORITY TIMEOUT VRF
353 # ------------------------------------------------------------------------------------------------
354 # 1.2.3.4 pap ***** 50 2 10 mgmt
355 # localhost pap 49 1 5 default
356 #
357
358 - name: Merge tacacs configurations
359 dellemc.enterprise_sonic.sonic_tacacs_server:
360 config:
361 auth_type: login
362 key: login
363 source_interface: Ethernet 12
364 timeout: 10
365 servers:
366 host:
367 - name: 1.2.3.4
368 state: deleted
369
370 # After state:
371 # ------------
372 #
373 # do show tacacs-server
374 # ---------------------------------------------------------
375 # TACACS Global Configuration
376 # ---------------------------------------------------------
377 # timeout : 5
378 # auth-type : pap
379 # ------------------------------------------------------------------------------------------------
380 # HOST AUTH-TYPE KEY PORT PRIORITY TIMEOUT VRF
381 # ------------------------------------------------------------------------------------------------
382 # localhost pap 49 1 5 default
383
384
385 # Using "deleted" state
386 #
387 # Before state:
388 # -------------
389 #
390 # do show tacacs-server
391 # ---------------------------------------------------------
392 # TACACS Global Configuration
393 # ---------------------------------------------------------
394 # source-interface : Ethernet12
395 # timeout : 10
396 # auth-type : login
397 # key : login
398 # ------------------------------------------------------------------------------------------------
399 # HOST AUTH-TYPE KEY PORT PRIORITY TIMEOUT VRF
400 # ------------------------------------------------------------------------------------------------
401 # 1.2.3.4 pap ***** 50 2 10 mgmt
402 # localhost pap 49 1 5 default
403 #
404
405 - name: Merge tacacs configurations
406 dellemc.enterprise_sonic.sonic_tacacs_server:
407 config:
408 state: deleted
409
410 # After state:
411 # ------------
412 #
413 # do show tacacs-server
414 # ---------------------------------------------------------
415 # TACACS Global Configuration
416 # ---------------------------------------------------------
417 # timeout : 5
418 # auth-type : pap
419
420
421 # Using "merged" state
422 #
423 # Before state:
424 # -------------
425 #
426 # sonic(config)# do show tacacs-server
427 # ---------------------------------------------------------
428 # TACACS Global Configuration
429 # ---------------------------------------------------------
430 #
431 - name: Merge tacacs configurations
432 dellemc.enterprise_sonic.sonic_tacacs_server:
433 config:
434 auth_type: pap
435 key: pap
436 source_interface: Ethernet 12
437 timeout: 10
438 servers:
439 host:
440 - name: 1.2.3.4
441 auth_type: pap
442 key: 1234
443 state: merged
444
445 # After state:
446 # ------------
447 #
448 # sonic(config)# do show tacacs-server
449 # ---------------------------------------------------------
450 # TACACS Global Configuration
451 # ---------------------------------------------------------
452 # source-interface : Ethernet12
453 # timeout : 10
454 # auth-type : pap
455 # key : pap
456 # ------------------------------------------------------------------------------------------------
457 # HOST AUTH-TYPE KEY PORT PRIORITY TIMEOUT VRF
458 # ------------------------------------------------------------------------------------------------
459 # 1.2.3.4 pap 1234 49 1 5 default
460 #
461 # Using "replaced" state
462 #
463 # Before state:
464 # -------------
465 #
466 # sonic(config)# do show tacacs-server
467 # ---------------------------------------------------------
468 # TACACS Global Configuration
469 # ---------------------------------------------------------
470 # source-interface : Ethernet12
471 # timeout : 10
472 # auth-type : pap
473 # key configured : Yes
474 # --------------------------------------------------------------------------------------
475 # HOST AUTH-TYPE KEY-CONFIG PORT PRIORITY TIMEOUT VRF
476 # --------------------------------------------------------------------------------------
477 # 1.2.3.4 pap No 49 1 5 default
478 #
479 - name: Replace tacacs configurations
480 sonic_tacacs_server:
481 config:
482 auth_type: pap
483 key: pap
484 source_interface: Ethernet12
485 timeout: 10
486 servers:
487 - host:
488 name: 1.2.3.4
489 auth_type: mschap
490 key: 1234
491 state: replaced
492 #
493 # After state:
494 # ------------
495 #
496 # sonic(config)# do show tacacs-server
497 # ---------------------------------------------------------
498 # TACACS Global Configuration
499 # ---------------------------------------------------------
500 # source-interface : Ethernet12
501 # timeout : 10
502 # auth-type : pap
503 # key configured : Yes
504 # --------------------------------------------------------------------------------------
505 # HOST AUTH-TYPE KEY-CONFIG PORT PRIORITY TIMEOUT VRF
506 # --------------------------------------------------------------------------------------
507 # 1.2.3.4 mschap Yes 49 1 5 default
508 #
509 # Using "overridden" state
510 #
511 # Before state:
512 # -------------
513 #
514 # sonic(config)# do show tacacs-server
515 # ---------------------------------------------------------
516 # TACACS Global Configuration
517 # ---------------------------------------------------------
518 # source-interface : Ethernet12
519 # timeout : 10
520 # auth-type : pap
521 # key configured : Yes
522 # --------------------------------------------------------------------------------------
523 # HOST AUTH-TYPE KEY-CONFIG PORT PRIORITY TIMEOUT VRF
524 # --------------------------------------------------------------------------------------
525 # 1.2.3.4 pap No 49 1 5 default
526 # 11.12.13.14 chap Yes 49 10 5 default
527 #
528 - name: Override tacacs configurations
529 sonic_tacacs_server:
530 config:
531 auth_type: mschap
532 key: mschap
533 source_interface: Ethernet12
534 timeout: 20
535 servers:
536 - host:
537 name: 1.2.3.4
538 auth_type: mschap
539 key: mschap
540 - host:
541 name: 10.10.11.12
542 auth_type: chap
543 timeout: 30
544 priority: 2
545 state: overridden
546 #
547 # After state:
548 # ------------
549 #
550 # sonic(config)# do show tacacs-server
551 # ---------------------------------------------------------
552 # TACACS Global Configuration
553 # ---------------------------------------------------------
554 # source-interface : Ethernet12
555 # timeout : 20
556 # auth-type : mschap
557 # key configured : Yes
558 # --------------------------------------------------------------------------------------
559 # HOST AUTH-TYPE KEY-CONFIG PORT PRIORITY TIMEOUT VRF
560 # --------------------------------------------------------------------------------------
561 # 1.2.3.4 mschap Yes 49 1 5 default
562 # 10.10.11.12 chap No 49 2 30 default
563 #
564
565
566
567 Return Values
568 -------------
569 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:
570
571 .. raw:: html
572
573 <table border=0 cellpadding=0 class="documentation-table">
574 <tr>
575 <th colspan="1">Key</th>
576 <th>Returned</th>
577 <th width="100%">Description</th>
578 </tr>
579 <tr>
580 <td colspan="1">
581 <div class="ansibleOptionAnchor" id="return-"></div>
582 <b>after</b>
583 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
584 <div style="font-size: small">
585 <span style="color: purple">list</span>
586 </div>
587 </td>
588 <td>when changed</td>
589 <td>
590 <div>The resulting configuration module invocation.</div>
591 <br/>
592 <div style="font-size: smaller"><b>Sample:</b></div>
593 <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 as the parameters above.</div>
594 </td>
595 </tr>
596 <tr>
597 <td colspan="1">
598 <div class="ansibleOptionAnchor" id="return-"></div>
599 <b>before</b>
600 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
601 <div style="font-size: small">
602 <span style="color: purple">list</span>
603 </div>
604 </td>
605 <td>always</td>
606 <td>
607 <div>The configuration prior to the module invocation.</div>
608 <br/>
609 <div style="font-size: smaller"><b>Sample:</b></div>
610 <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 as the parameters above.</div>
611 </td>
612 </tr>
613 <tr>
614 <td colspan="1">
615 <div class="ansibleOptionAnchor" id="return-"></div>
616 <b>commands</b>
617 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
618 <div style="font-size: small">
619 <span style="color: purple">list</span>
620 </div>
621 </td>
622 <td>always</td>
623 <td>
624 <div>The set of commands pushed to the remote device.</div>
625 <br/>
626 <div style="font-size: smaller"><b>Sample:</b></div>
627 <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>
628 </td>
629 </tr>
630 </table>
631 <br/><br/>
632
633
634 Status
635 ------
636
637
638 Authors
639 ~~~~~~~
640
641 - Niraimadaiselvam M (@niraimadaiselvamm)