Debian Codegraph @

ansible_collections/dellemc/enterprise_sonic/docs/dellemc.enterprise_sonic.sonic_login_lockout_module.rst

raw
1 .. _dellemc.enterprise_sonic.sonic_login_lockout_module:
2
3
4 ********************************************
5 dellemc.enterprise_sonic.sonic_login_lockout
6 ********************************************
7
8 **Manage Global Login Lockout configurations on SONiC**
9
10
11 Version added: 2.5.0
12
13 .. contents::
14 :local:
15 :depth: 1
16
17
18 Synopsis
19 --------
20 - This module provides configuration management of login lockout parameters.
21 - Login Lockout feature is to lock out the user account for user-lockout-period after the max-retry failed attempts. Console exempt option can be enabled to skip the login lockout validations for console users.
22
23
24
25
26 Parameters
27 ----------
28
29 .. raw:: html
30
31 <table border=0 cellpadding=0 class="documentation-table">
32 <tr>
33 <th colspan="2">Parameter</th>
34 <th>Choices/<font color="blue">Defaults</font></th>
35 <th width="100%">Comments</th>
36 </tr>
37 <tr>
38 <td colspan="2">
39 <div class="ansibleOptionAnchor" id="parameter-"></div>
40 <b>config</b>
41 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
42 <div style="font-size: small">
43 <span style="color: purple">dictionary</span>
44 </div>
45 </td>
46 <td>
47 </td>
48 <td>
49 <div>The set of login lockout attribute configurations</div>
50 </td>
51 </tr>
52 <tr>
53 <td class="elbow-placeholder"></td>
54 <td colspan="1">
55 <div class="ansibleOptionAnchor" id="parameter-"></div>
56 <b>console_exempt</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>Exempt console logins from account lockout.</div>
70 </td>
71 </tr>
72 <tr>
73 <td class="elbow-placeholder"></td>
74 <td colspan="1">
75 <div class="ansibleOptionAnchor" id="parameter-"></div>
76 <b>max_retries</b>
77 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
78 <div style="font-size: small">
79 <span style="color: purple">integer</span>
80 </div>
81 </td>
82 <td>
83 </td>
84 <td>
85 <div>The number of maximum password retries.</div>
86 <div>The range is from 0 to 16</div>
87 </td>
88 </tr>
89 <tr>
90 <td class="elbow-placeholder"></td>
91 <td colspan="1">
92 <div class="ansibleOptionAnchor" id="parameter-"></div>
93 <b>period</b>
94 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
95 <div style="font-size: small">
96 <span style="color: purple">integer</span>
97 </div>
98 </td>
99 <td>
100 </td>
101 <td>
102 <div>Account lockout period in minutes</div>
103 <div>The range is from 0 to 43200</div>
104 </td>
105 </tr>
106
107 <tr>
108 <td colspan="2">
109 <div class="ansibleOptionAnchor" id="parameter-"></div>
110 <b>state</b>
111 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
112 <div style="font-size: small">
113 <span style="color: purple">string</span>
114 </div>
115 </td>
116 <td>
117 <ul style="margin: 0; padding: 0"><b>Choices:</b>
118 <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
119 <li>deleted</li>
120 <li>overridden</li>
121 <li>replaced</li>
122 </ul>
123 </td>
124 <td>
125 <div>Specifies the operation to be performed on the login attributes configured on the device.</div>
126 <div>If the state is &quot;merged&quot;, merge specified attributes with existing configured login attributes.</div>
127 <div>For &quot;deleted&quot;, delete the specified login attributes from existing configuration.</div>
128 <div>For &quot;overridden&quot;, Overrides all on-device login lockout configurations with the provided configuration.</div>
129 <div>For &quot;replaced&quot;, Replaces on-device login lockout configurations with the provided configuration.</div>
130 </td>
131 </tr>
132 </table>
133 <br/>
134
135
136
137
138 Examples
139 --------
140
141 .. code-block:: yaml
142
143 # Using "deleted" state
144 #
145 # Before state:
146 # -------------
147 #
148 # sonic# show running-configuration | grep lockout
149 # !
150 # login lockout period 12
151 # login lockout max-retries 5
152 # login lockout console-exempt
153 # !
154
155 - name: Delete Login Lockout configurations
156 dellemc.enterprise_sonic.sonic_login_lockout:
157 config:
158 period: 12
159 max_retries: 5
160 state: deleted
161
162 # After state:
163 # ------------
164 # sonic# show running-configuration | grep lockout
165 # !
166 # login lockout console-exempt
167 # !
168 # sonic#
169
170
171 # Using "merged" state
172 #
173 # Before state:
174 # -------------
175 #
176 # sonic# show running-configuration | grep lockout
177 # sonic#
178
179 - name: Modify Login Lockout configurations
180 dellemc.enterprise_sonic.sonic_login_lockout:
181 config:
182 console_exempt: true
183 period: 12
184 max_retries: 5
185 state: merged
186
187 # After state:
188 # ------------
189 # sonic# show running-configuration | grep lockout
190 # !
191 # login lockout period 12
192 # login lockout max-retries 5
193 # login lockout console-exempt
194 # !
195
196 # Using "overridden" state
197 #
198 # Before state:
199 # -------------
200 #
201 # sonic# show running-configuration | grep lockout
202 # !
203 # login lockout period 10
204 # login lockout max-retries 2
205 # !
206 # sonic#
207
208 - name: Override Login Lockout configurations
209 dellemc.enterprise_sonic.sonic_login_lockout:
210 config:
211 console_exempt: true
212 period: 11
213 max_retries: 3
214 state: overridden
215
216 # After state:
217 # ------------
218 # sonic# show running-configuration | grep lockout
219 # !
220 # login lockout period 11
221 # login lockout max-retries 3
222 # login lockout console-exempt
223 # !
224
225 # Using "replaced" state
226 #
227 # Before state:
228 # -------------
229 #
230 # sonic# show running-configuration | grep lockout
231 # !
232 # login lockout period 10
233 # login lockout max-retries 2
234 # !
235 # sonic#
236
237 - name: Replace Login Lockout configurations
238 dellemc.enterprise_sonic.sonic_login_lockout:
239 config:
240 period: 15
241 state: replaced
242
243 # After state:
244 # ------------
245 # sonic# show running-configuration | grep lockout
246 # !
247 # login lockout period 15
248 # !
249
250
251
252 Return Values
253 -------------
254 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:
255
256 .. raw:: html
257
258 <table border=0 cellpadding=0 class="documentation-table">
259 <tr>
260 <th colspan="1">Key</th>
261 <th>Returned</th>
262 <th width="100%">Description</th>
263 </tr>
264 <tr>
265 <td colspan="1">
266 <div class="ansibleOptionAnchor" id="return-"></div>
267 <b>after</b>
268 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
269 <div style="font-size: small">
270 <span style="color: purple">dictionary</span>
271 </div>
272 </td>
273 <td>when changed</td>
274 <td>
275 <div>The resulting configuration module invocation.</div>
276 <br/>
277 <div style="font-size: smaller"><b>Sample:</b></div>
278 <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>
279 </td>
280 </tr>
281 <tr>
282 <td colspan="1">
283 <div class="ansibleOptionAnchor" id="return-"></div>
284 <b>before</b>
285 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
286 <div style="font-size: small">
287 <span style="color: purple">dictionary</span>
288 </div>
289 </td>
290 <td>always</td>
291 <td>
292 <div>The configuration prior to the module invocation.</div>
293 <br/>
294 <div style="font-size: smaller"><b>Sample:</b></div>
295 <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>
296 </td>
297 </tr>
298 <tr>
299 <td colspan="1">
300 <div class="ansibleOptionAnchor" id="return-"></div>
301 <b>commands</b>
302 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
303 <div style="font-size: small">
304 <span style="color: purple">list</span>
305 </div>
306 </td>
307 <td>always</td>
308 <td>
309 <div>The set of commands pushed to the remote device.</div>
310 <br/>
311 <div style="font-size: smaller"><b>Sample:</b></div>
312 <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>
313 </td>
314 </tr>
315 </table>
316 <br/><br/>
317
318
319 Status
320 ------
321
322
323 Authors
324 ~~~~~~~
325
326 - Arul Kumar Shankara Narayanan(@arulkumar9690)