Debian Codegraph @

ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_lacp_module.rst

raw
1 .. _cisco.nxos.nxos_lacp_module:
2
3
4 ********************
5 cisco.nxos.nxos_lacp
6 ********************
7
8 **LACP resource module**
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 Global Link Aggregation Control Protocol (LACP) on NX-OS 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="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>LACP global options.</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>system</b>
56 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
57 <div style="font-size: small">
58 <span style="color: purple">dictionary</span>
59 </div>
60 </td>
61 <td>
62 </td>
63 <td>
64 <div>LACP system options</div>
65 </td>
66 </tr>
67 <tr>
68 <td class="elbow-placeholder"></td>
69 <td class="elbow-placeholder"></td>
70 <td colspan="2">
71 <div class="ansibleOptionAnchor" id="parameter-"></div>
72 <b>mac</b>
73 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
74 <div style="font-size: small">
75 <span style="color: purple">dictionary</span>
76 </div>
77 </td>
78 <td>
79 </td>
80 <td>
81 <div>MAC address to be used for the LACP Protocol exchanges</div>
82 </td>
83 </tr>
84 <tr>
85 <td class="elbow-placeholder"></td>
86 <td class="elbow-placeholder"></td>
87 <td class="elbow-placeholder"></td>
88 <td colspan="1">
89 <div class="ansibleOptionAnchor" id="parameter-"></div>
90 <b>address</b>
91 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
92 <div style="font-size: small">
93 <span style="color: purple">string</span>
94 </div>
95 </td>
96 <td>
97 </td>
98 <td>
99 <div>MAC-address (FORMAT :xxxx.xxxx.xxxx).</div>
100 </td>
101 </tr>
102 <tr>
103 <td class="elbow-placeholder"></td>
104 <td class="elbow-placeholder"></td>
105 <td class="elbow-placeholder"></td>
106 <td colspan="1">
107 <div class="ansibleOptionAnchor" id="parameter-"></div>
108 <b>role</b>
109 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
110 <div style="font-size: small">
111 <span style="color: purple">string</span>
112 </div>
113 </td>
114 <td>
115 <ul style="margin: 0; padding: 0"><b>Choices:</b>
116 <li>primary</li>
117 <li>secondary</li>
118 </ul>
119 </td>
120 <td>
121 <div>The role for the Switch.</div>
122 </td>
123 </tr>
124
125 <tr>
126 <td class="elbow-placeholder"></td>
127 <td class="elbow-placeholder"></td>
128 <td colspan="2">
129 <div class="ansibleOptionAnchor" id="parameter-"></div>
130 <b>priority</b>
131 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
132 <div style="font-size: small">
133 <span style="color: purple">integer</span>
134 </div>
135 </td>
136 <td>
137 </td>
138 <td>
139 <div>The system priority to use in LACP negotiations.</div>
140 </td>
141 </tr>
142
143
144 <tr>
145 <td colspan="4">
146 <div class="ansibleOptionAnchor" id="parameter-"></div>
147 <b>running_config</b>
148 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
149 <div style="font-size: small">
150 <span style="color: purple">string</span>
151 </div>
152 </td>
153 <td>
154 </td>
155 <td>
156 <div>This option is used only with state <em>parsed</em>.</div>
157 <div>The value of this option should be the output received from the NX-OS device by executing the command <b>show running-config | include lacp</b>.</div>
158 <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>
159 </td>
160 </tr>
161 <tr>
162 <td colspan="4">
163 <div class="ansibleOptionAnchor" id="parameter-"></div>
164 <b>state</b>
165 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
166 <div style="font-size: small">
167 <span style="color: purple">string</span>
168 </div>
169 </td>
170 <td>
171 <ul style="margin: 0; padding: 0"><b>Choices:</b>
172 <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
173 <li>replaced</li>
174 <li>overridden</li>
175 <li>deleted</li>
176 <li>gathered</li>
177 <li>rendered</li>
178 <li>parsed</li>
179 </ul>
180 </td>
181 <td>
182 <div>The state of the configuration after module completion.</div>
183 <div>States <code>replaced</code> and <code>overridden</code> have the same behaviour for this module.</div>
184 </td>
185 </tr>
186 </table>
187 <br/>
188
189
190 Notes
191 -----
192
193 .. note::
194 - Tested against NXOS 7.3.(0)D1(1) on VIRL.
195 - Unsupported for Cisco MDS
196 - Feature lacp should be enabled for this module.
197
198
199
200 Examples
201 --------
202
203 .. code-block:: yaml
204
205 # Using merged
206
207 # Before state:
208 # -------------
209 #
210
211 - name: Merge provided configuration with device configuration.
212 cisco.nxos.nxos_lacp:
213 config:
214 system:
215 priority: 10
216 mac:
217 address: 00c1.4c00.bd15
218 state: merged
219
220 # After state:
221 # ------------
222 #
223 # lacp system-priority 10
224 # lacp system-mac 00c1.4c00.bd15
225
226
227 # Using replaced
228
229 # Before state:
230 # -------------
231 #
232 # lacp system-priority 10
233
234 - name: Replace device global lacp configuration with the given configuration.
235 cisco.nxos.nxos_lacp:
236 config:
237 system:
238 mac:
239 address: 00c1.4c00.bd15
240 state: replaced
241
242 # After state:
243 # ------------
244 #
245 # lacp system-mac 00c1.4c00.bd15
246
247
248 # Using deleted
249
250 # Before state:
251 # -------------
252 #
253 # lacp system-priority 10
254
255 - name: Delete global LACP configurations.
256 cisco.nxos.nxos_lacp:
257 state: deleted
258
259 # After state:
260 # ------------
261 #
262
263 # Using rendered
264
265 - name: Render platform specific configuration lines (without connecting to the device)
266 cisco.nxos.nxos_lacp:
267 config:
268 system:
269 priority: 10
270 mac:
271 address: 00c1.4c00.bd15
272 role: secondary
273 state: rendered
274
275 # Task Output (redacted)
276 # -----------------------
277
278 # rendered:
279 # - "lacp system-priority 10"
280 # - "lacp system-mac 00c1.4c00.bd15 role secondary"
281
282 # Using parsed
283
284 # parsed.cfg
285 # ------------
286 # lacp system-priority 10
287 # lacp system-mac 00c1.4c00.bd15 role secondary
288
289 - name: Use parsed state to convert externally supplied config to structured format
290 cisco.nxos.nxos_lacp:
291 running_config: "{{ lookup('file', 'parsed.cfg') }}"
292 state: parsed
293
294 # Task output (redacted)
295 # -----------------------
296 # parsed:
297 # system:
298 # priority: 10
299 # mac:
300 # address: 00c1.4c00.bd15
301 # role: secondary
302
303 # Using gathered
304
305 # Existing device config state
306 # -------------------------------
307 # Nexus9000v# show running-config | include lacp
308 # lacp system-priority 11
309 # lacp system-mac 00c1.4c00.bd15 role primary
310
311 - name: Gather lacp facts from the device using nxos_lacp
312 cisco.nxos.nxos_lacp:
313 state: gathered
314
315 # Task output (redacted)
316 # -----------------------
317 # gathered:
318 # system:
319 # priority: 11
320 # mac:
321 # address: 00c1.4c00.bd15
322 # role: primary
323
324
325
326 Return Values
327 -------------
328 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:
329
330 .. raw:: html
331
332 <table border=0 cellpadding=0 class="documentation-table">
333 <tr>
334 <th colspan="1">Key</th>
335 <th>Returned</th>
336 <th width="100%">Description</th>
337 </tr>
338 <tr>
339 <td colspan="1">
340 <div class="ansibleOptionAnchor" id="return-"></div>
341 <b>after</b>
342 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
343 <div style="font-size: small">
344 <span style="color: purple">dictionary</span>
345 </div>
346 </td>
347 <td>when changed</td>
348 <td>
349 <div>The configuration as structured data after module completion.</div>
350 <br/>
351 <div style="font-size: smaller"><b>Sample:</b></div>
352 <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
353 of the parameters above.</div>
354 </td>
355 </tr>
356 <tr>
357 <td colspan="1">
358 <div class="ansibleOptionAnchor" id="return-"></div>
359 <b>before</b>
360 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
361 <div style="font-size: small">
362 <span style="color: purple">dictionary</span>
363 </div>
364 </td>
365 <td>always</td>
366 <td>
367 <div>The configuration as structured data prior to module invocation.</div>
368 <br/>
369 <div style="font-size: smaller"><b>Sample:</b></div>
370 <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
371 of the parameters above.</div>
372 </td>
373 </tr>
374 <tr>
375 <td colspan="1">
376 <div class="ansibleOptionAnchor" id="return-"></div>
377 <b>commands</b>
378 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
379 <div style="font-size: small">
380 <span style="color: purple">list</span>
381 </div>
382 </td>
383 <td>always</td>
384 <td>
385 <div>The set of commands pushed to the remote device.</div>
386 <br/>
387 <div style="font-size: smaller"><b>Sample:</b></div>
388 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;lacp system-priority 15&#x27;, &#x27;lacp system-mac 00c1.4c00.bd15 role primary&#x27;]</div>
389 </td>
390 </tr>
391 </table>
392 <br/><br/>
393
394
395 Status
396 ------
397
398
399 Authors
400 ~~~~~~~
401
402 - Trishna Guha (@trishnaguha)