Debian Codegraph @

ansible_collections/cisco/ios/docs/cisco.ios.ios_config_module.rst

raw
1 .. _cisco.ios.ios_config_module:
2
3
4 ********************
5 cisco.ios.ios_config
6 ********************
7
8 **Module to manage configuration sections.**
9
10
11 Version added: 1.0.0
12
13 .. contents::
14 :local:
15 :depth: 1
16
17
18 Synopsis
19 --------
20 - Cisco IOS configurations use a simple block indent file syntax for segmenting configuration into sections. This module provides an implementation for working with IOS configuration sections in a deterministic way.
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="2">Parameter</th>
33 <th>Choices/<font color="blue">Defaults</font></th>
34 <th width="100%">Comments</th>
35 </tr>
36 <tr>
37 <td colspan="2">
38 <div class="ansibleOptionAnchor" id="parameter-"></div>
39 <b>after</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=string</span>
44 </div>
45 </td>
46 <td>
47 </td>
48 <td>
49 <div>The ordered set of commands to append to the end of the command stack if a change needs to be made. Just like with <em>before</em> this allows the playbook designer to append a set of commands to be executed after the command set.</div>
50 </td>
51 </tr>
52 <tr>
53 <td colspan="2">
54 <div class="ansibleOptionAnchor" id="parameter-"></div>
55 <b>backup</b>
56 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
57 <div style="font-size: small">
58 <span style="color: purple">boolean</span>
59 </div>
60 </td>
61 <td>
62 <ul style="margin: 0; padding: 0"><b>Choices:</b>
63 <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
64 <li>yes</li>
65 </ul>
66 </td>
67 <td>
68 <div>This argument will cause the module to create a full backup of the current <code>running-config</code> from the remote device before any changes are made. If the <code>backup_options</code> value is not given, the backup file is written to the <code>backup</code> folder in the playbook root directory or role root directory, if playbook is part of an ansible role. If the directory does not exist, it is created.</div>
69 </td>
70 </tr>
71 <tr>
72 <td colspan="2">
73 <div class="ansibleOptionAnchor" id="parameter-"></div>
74 <b>backup_options</b>
75 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
76 <div style="font-size: small">
77 <span style="color: purple">dictionary</span>
78 </div>
79 </td>
80 <td>
81 </td>
82 <td>
83 <div>This is a dict object containing configurable options related to backup file path. The value of this option is read only when <code>backup</code> is set to <em>yes</em>, if <code>backup</code> is set to <em>no</em> this option will be silently ignored.</div>
84 </td>
85 </tr>
86 <tr>
87 <td class="elbow-placeholder"></td>
88 <td colspan="1">
89 <div class="ansibleOptionAnchor" id="parameter-"></div>
90 <b>dir_path</b>
91 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
92 <div style="font-size: small">
93 <span style="color: purple">path</span>
94 </div>
95 </td>
96 <td>
97 </td>
98 <td>
99 <div>This option provides the path ending with directory name in which the backup configuration file will be stored. If the directory does not exist it will be first created and the filename is either the value of <code>filename</code> or default filename as described in <code>filename</code> options description. If the path value is not given in that case a <em>backup</em> directory will be created in the current working directory and backup configuration will be copied in <code>filename</code> within <em>backup</em> directory.</div>
100 </td>
101 </tr>
102 <tr>
103 <td class="elbow-placeholder"></td>
104 <td colspan="1">
105 <div class="ansibleOptionAnchor" id="parameter-"></div>
106 <b>filename</b>
107 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
108 <div style="font-size: small">
109 <span style="color: purple">string</span>
110 </div>
111 </td>
112 <td>
113 </td>
114 <td>
115 <div>The filename to be used to store the backup configuration. If the filename is not given it will be generated based on the hostname, current time and date in format defined by &lt;hostname&gt;_config.&lt;current-date&gt;@&lt;current-time&gt;</div>
116 </td>
117 </tr>
118
119 <tr>
120 <td colspan="2">
121 <div class="ansibleOptionAnchor" id="parameter-"></div>
122 <b>before</b>
123 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
124 <div style="font-size: small">
125 <span style="color: purple">list</span>
126 / <span style="color: purple">elements=string</span>
127 </div>
128 </td>
129 <td>
130 </td>
131 <td>
132 <div>The ordered set of commands to push on to the command stack if a change needs to be made. This allows the playbook designer the opportunity to perform configuration commands prior to pushing any changes without affecting how the set of commands are matched against the system.</div>
133 </td>
134 </tr>
135 <tr>
136 <td colspan="2">
137 <div class="ansibleOptionAnchor" id="parameter-"></div>
138 <b>content</b>
139 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
140 <div style="font-size: small">
141 <span style="color: purple">string</span>
142 </div>
143 </td>
144 <td>
145 </td>
146 <td>
147 <div>Configuration content to apply to the device. This should be the rendered configuration text, not a file path.</div>
148 <div>This is the recommended way to provide templated configurations. Use <code>ansible.builtin.template</code> lookup to render your Jinja2 template and pass the output to this parameter.</div>
149 <div>This argument is mutually exclusive with <em>src</em>, <em>lines</em>, and <em>parents</em>.</div>
150 <div>Example: <code>content: &quot;{{ lookup(&#x27;ansible.builtin.template&#x27;, &#x27;config.j2&#x27;</code> }}&quot;)</div>
151 </td>
152 </tr>
153 <tr>
154 <td colspan="2">
155 <div class="ansibleOptionAnchor" id="parameter-"></div>
156 <b>defaults</b>
157 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
158 <div style="font-size: small">
159 <span style="color: purple">boolean</span>
160 </div>
161 </td>
162 <td>
163 <ul style="margin: 0; padding: 0"><b>Choices:</b>
164 <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
165 <li>yes</li>
166 </ul>
167 </td>
168 <td>
169 <div>This argument specifies whether or not to collect all defaults when getting the remote device running config. When enabled, the module will get the current config by issuing the command <code>show running-config all</code>.</div>
170 </td>
171 </tr>
172 <tr>
173 <td colspan="2">
174 <div class="ansibleOptionAnchor" id="parameter-"></div>
175 <b>diff_against</b>
176 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
177 <div style="font-size: small">
178 <span style="color: purple">string</span>
179 </div>
180 </td>
181 <td>
182 <ul style="margin: 0; padding: 0"><b>Choices:</b>
183 <li>running</li>
184 <li>startup</li>
185 <li>intended</li>
186 </ul>
187 </td>
188 <td>
189 <div>When using the <code>ansible-playbook --diff</code> command line argument the module can generate diffs against different sources.</div>
190 <div>When this option is configure as <em>startup</em>, the module will return the diff of the running-config against the startup-config.</div>
191 <div>When this option is configured as <em>intended</em>, the module will return the diff of the running-config against the configuration provided in the <code>intended_config</code> argument.</div>
192 <div>When this option is configured as <em>running</em>, the module will return the before and after diff of the running-config with respect to any changes made to the device configuration.</div>
193 </td>
194 </tr>
195 <tr>
196 <td colspan="2">
197 <div class="ansibleOptionAnchor" id="parameter-"></div>
198 <b>diff_ignore_lines</b>
199 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
200 <div style="font-size: small">
201 <span style="color: purple">list</span>
202 / <span style="color: purple">elements=string</span>
203 </div>
204 </td>
205 <td>
206 </td>
207 <td>
208 <div>Use this argument to specify one or more lines that should be ignored during the diff. This is used for lines in the configuration that are automatically updated by the system. This argument takes a list of regular expressions or exact line matches.</div>
209 </td>
210 </tr>
211 <tr>
212 <td colspan="2">
213 <div class="ansibleOptionAnchor" id="parameter-"></div>
214 <b>intended_config</b>
215 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
216 <div style="font-size: small">
217 <span style="color: purple">string</span>
218 </div>
219 </td>
220 <td>
221 </td>
222 <td>
223 <div>The <code>intended_config</code> provides the master configuration that the node should conform to and is used to check the final running-config against. This argument will not modify any settings on the remote device and is strictly used to check the compliance of the current device&#x27;s configuration against. When specifying this argument, the task should also modify the <code>diff_against</code> value and set it to <em>intended</em>. The configuration lines for this value should be similar to how it will appear if present in the running-configuration of the device including the indentation to ensure correct diff.</div>
224 </td>
225 </tr>
226 <tr>
227 <td colspan="2">
228 <div class="ansibleOptionAnchor" id="parameter-"></div>
229 <b>lines</b>
230 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
231 <div style="font-size: small">
232 <span style="color: purple">list</span>
233 / <span style="color: purple">elements=raw</span>
234 </div>
235 </td>
236 <td>
237 </td>
238 <td>
239 <div>The ordered set of commands that should be configured in the section. The commands must be the exact same commands as found in the device running-config to ensure idempotency and correct diff. Be sure to note the configuration command syntax as some commands are automatically modified by the device config parser.</div>
240 <div style="font-size: small; color: darkgreen"><br/>aliases: commands</div>
241 </td>
242 </tr>
243 <tr>
244 <td class="elbow-placeholder"></td>
245 <td colspan="1">
246 <div class="ansibleOptionAnchor" id="parameter-"></div>
247 <b>answer</b>
248 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
249 <div style="font-size: small">
250 <span style="color: purple">string</span>
251 </div>
252 </td>
253 <td>
254 </td>
255 <td>
256 <div>answer to send to device in order to handle prompt on device in configration mode</div>
257 </td>
258 </tr>
259 <tr>
260 <td class="elbow-placeholder"></td>
261 <td colspan="1">
262 <div class="ansibleOptionAnchor" id="parameter-"></div>
263 <b>config_line</b>
264 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
265 <div style="font-size: small">
266 <span style="color: purple">string</span>
267 </div>
268 </td>
269 <td>
270 </td>
271 <td>
272 <div>use to specify config lines when options are required to declare,works sames as lines</div>
273 </td>
274 </tr>
275 <tr>
276 <td class="elbow-placeholder"></td>
277 <td colspan="1">
278 <div class="ansibleOptionAnchor" id="parameter-"></div>
279 <b>prompt</b>
280 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
281 <div style="font-size: small">
282 <span style="color: purple">string</span>
283 </div>
284 </td>
285 <td>
286 </td>
287 <td>
288 <div>prompt message to handle while editng configurations on device in configration mode</div>
289 </td>
290 </tr>
291
292 <tr>
293 <td colspan="2">
294 <div class="ansibleOptionAnchor" id="parameter-"></div>
295 <b>match</b>
296 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
297 <div style="font-size: small">
298 <span style="color: purple">string</span>
299 </div>
300 </td>
301 <td>
302 <ul style="margin: 0; padding: 0"><b>Choices:</b>
303 <li><div style="color: blue"><b>line</b>&nbsp;&larr;</div></li>
304 <li>strict</li>
305 <li>exact</li>
306 <li>none</li>
307 </ul>
308 </td>
309 <td>
310 <div>Instructs the module on the way to perform the matching of the set of commands against the current device config. If match is set to <em>line</em>, commands are matched line by line. If match is set to <em>strict</em>, command lines are matched with respect to position. If match is set to <em>exact</em>, command lines must be an equal match. Finally, if match is set to <em>none</em>, the module will not attempt to compare the source configuration with the running configuration on the remote device.</div>
311 </td>
312 </tr>
313 <tr>
314 <td colspan="2">
315 <div class="ansibleOptionAnchor" id="parameter-"></div>
316 <b>multiline_delimiter</b>
317 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
318 <div style="font-size: small">
319 <span style="color: purple">string</span>
320 </div>
321 </td>
322 <td>
323 <b>Default:</b><br/><div style="color: blue">"@"</div>
324 </td>
325 <td>
326 <div>This argument is used when pushing a multiline configuration element to the IOS device. It specifies the character to use as the delimiting character. This only applies to the configuration action.</div>
327 </td>
328 </tr>
329 <tr>
330 <td colspan="2">
331 <div class="ansibleOptionAnchor" id="parameter-"></div>
332 <b>parents</b>
333 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
334 <div style="font-size: small">
335 <span style="color: purple">list</span>
336 / <span style="color: purple">elements=string</span>
337 </div>
338 </td>
339 <td>
340 </td>
341 <td>
342 <div>The ordered set of parents that uniquely identify the section or hierarchy the commands should be checked against. If the parents argument is omitted, the commands are checked against the set of top level or global commands.</div>
343 </td>
344 </tr>
345 <tr>
346 <td colspan="2">
347 <div class="ansibleOptionAnchor" id="parameter-"></div>
348 <b>replace</b>
349 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
350 <div style="font-size: small">
351 <span style="color: purple">string</span>
352 </div>
353 </td>
354 <td>
355 <ul style="margin: 0; padding: 0"><b>Choices:</b>
356 <li><div style="color: blue"><b>line</b>&nbsp;&larr;</div></li>
357 <li>block</li>
358 </ul>
359 </td>
360 <td>
361 <div>Instructs the module on the way to perform the configuration on the device. If the replace argument is set to <em>line</em> then the modified lines are pushed to the device in configuration mode. If the replace argument is set to <em>block</em> then the entire command block is pushed to the device in configuration mode if any line is not correct.</div>
362 </td>
363 </tr>
364 <tr>
365 <td colspan="2">
366 <div class="ansibleOptionAnchor" id="parameter-"></div>
367 <b>running_config</b>
368 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
369 <div style="font-size: small">
370 <span style="color: purple">string</span>
371 </div>
372 </td>
373 <td>
374 </td>
375 <td>
376 <div>The module, by default, will connect to the remote device and retrieve the current running-config to use as a base for comparing against the contents of source. There are times when it is not desirable to have the task get the current running-config for every task in a playbook. The <em>running_config</em> argument allows the implementer to pass in the configuration to use as the base config for comparison. The configuration lines for this option should be similar to how it will appear if present in the running-configuration of the device including the indentation to ensure idempotency and correct diff.</div>
377 <div style="font-size: small; color: darkgreen"><br/>aliases: config</div>
378 </td>
379 </tr>
380 <tr>
381 <td colspan="2">
382 <div class="ansibleOptionAnchor" id="parameter-"></div>
383 <b>save_when</b>
384 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
385 <div style="font-size: small">
386 <span style="color: purple">string</span>
387 </div>
388 </td>
389 <td>
390 <ul style="margin: 0; padding: 0"><b>Choices:</b>
391 <li>always</li>
392 <li><div style="color: blue"><b>never</b>&nbsp;&larr;</div></li>
393 <li>modified</li>
394 <li>changed</li>
395 </ul>
396 </td>
397 <td>
398 <div>When changes are made to the device running-configuration, the changes are not copied to non-volatile storage by default. Using this argument will change that before. If the argument is set to <em>always</em>, then the running-config will always be copied to the startup-config and the <em>modified</em> flag will always be set to True. If the argument is set to <em>modified</em>, then the running-config will only be copied to the startup-config if it has changed since the last save to startup-config. If the argument is set to <em>never</em>, the running-config will never be copied to the startup-config. If the argument is set to <em>changed</em>, then the running-config will only be copied to the startup-config if the task has made a change. <em>changed</em> was added in Ansible 2.5.</div>
399 </td>
400 </tr>
401 <tr>
402 <td colspan="2">
403 <div class="ansibleOptionAnchor" id="parameter-"></div>
404 <b>src</b>
405 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
406 <div style="font-size: small">
407 <span style="color: purple">string</span>
408 </div>
409 </td>
410 <td>
411 </td>
412 <td>
413 <div>Specifies the source path to the file that contains the configuration or configuration template to load. The path to the source file can either be the full path on the Ansible control host or a relative path from the playbook or role root directory. This argument is mutually exclusive with <em>lines</em>, <em>parents</em>, and <em>content</em>. The configuration lines in the source file should be similar to how it will appear if present in the running-configuration of the device including the indentation to ensure idempotency and correct diff.</div>
414 <div>NOTE: The <em>src</em> parameter will no longer process Jinja2 templates starting in January 2028. To use templated configurations, render the template using <code>ansible.builtin.template</code> lookup and pass the result to the <em>content</em> parameter instead.</div>
415 </td>
416 </tr>
417 </table>
418 <br/>
419
420
421 Notes
422 -----
423
424 .. note::
425 - Tested against Cisco IOSXE Version 17.3 on CML.
426 - Abbreviated commands are NOT idempotent, see https://docs.ansible.com/ansible/latest/network/user_guide/faq.html#why-do-the-config-modules-always-return-changed-true-with-abbreviated-commands
427 - To ensure idempotency and correct diff the configuration lines in the relevant module options should be similar to how they appear if present in the running configuration on device including the indentation.
428 - This module works with connection ``network_cli``. See https://docs.ansible.com/ansible/latest/network/user_guide/platform_ios.html
429 - The recommended way to use templated configurations is to render the template using ``ansible.builtin.template`` lookup and pass the result to the *content* parameter. Using *src* with Jinja2 templates is deprecated.
430 - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
431 - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
432
433
434
435 Examples
436 --------
437
438 .. code-block:: yaml
439
440 - name: Configure top level configuration
441 cisco.ios.ios_config:
442 lines: hostname {{ inventory_hostname }}
443
444 - name: Configure interface settings
445 cisco.ios.ios_config:
446 lines:
447 - description test interface
448 - ip address 172.31.1.1 255.255.255.0
449 parents: interface Ethernet1
450
451 - name: Configure ip helpers on multiple interfaces
452 cisco.ios.ios_config:
453 lines:
454 - ip helper-address 172.26.1.10
455 - ip helper-address 172.26.3.8
456 parents: "{{ item }}"
457 with_items:
458 - interface Ethernet1
459 - interface Ethernet2
460 - interface GigabitEthernet1
461
462 - name: Configure policer in Scavenger class
463 cisco.ios.ios_config:
464 lines:
465 - conform-action transmit
466 - exceed-action drop
467 parents:
468 - policy-map Foo
469 - class Scavenger
470 - police cir 64000
471
472 - name: Load new acl into device
473 cisco.ios.ios_config:
474 lines:
475 - 10 permit ip host 192.0.2.1 any log
476 - 20 permit ip host 192.0.2.2 any log
477 - 30 permit ip host 192.0.2.3 any log
478 - 40 permit ip host 192.0.2.4 any log
479 - 50 permit ip host 192.0.2.5 any log
480 parents: ip access-list extended test
481 before: no ip access-list extended test
482 match: exact
483
484 - name: Check the running-config against master config
485 cisco.ios.ios_config:
486 diff_against: intended
487 intended_config: "{{ lookup('file', 'master.cfg') }}"
488
489 - name: Check the startup-config against the running-config
490 cisco.ios.ios_config:
491 diff_against: startup
492 diff_ignore_lines:
493 - ntp clock .*
494
495 - name: Save running to startup when modified
496 cisco.ios.ios_config:
497 save_when: modified
498
499 - name: For idempotency, use full-form commands
500 cisco.ios.ios_config:
501 lines:
502 # - shut
503 - shutdown
504 # parents: int gig1/0/11
505 parents: interface GigabitEthernet1/0/11
506
507 # Set boot image based on comparison to a group_var (version) and the version
508 # that is returned from the `ios_facts` module
509 - name: Setting boot image
510 cisco.ios.ios_config:
511 lines:
512 - no boot system
513 - boot system flash bootflash:{{new_image}}
514 host: "{{ inventory_hostname }}"
515 when: ansible_net_version != version
516
517 - name: Render a Jinja2 template onto an IOS device (DEPRECATED - use content parameter)
518 cisco.ios.ios_config:
519 backup: true
520 src: ios_template.j2
521
522 - name: Configurable backup path
523 cisco.ios.ios_config:
524 src: ios_template.j2
525 backup: true
526 backup_options:
527 filename: backup.cfg
528 dir_path: /home/user
529
530 - name: Apply templated configuration using content parameter (RECOMMENDED)
531 cisco.ios.ios_config:
532 content: "{{ lookup('ansible.builtin.template', 'ios_template.j2') }}"
533 backup: true
534
535 - name: Apply templated configuration with backup options (RECOMMENDED)
536 cisco.ios.ios_config:
537 content: "{{ lookup('ansible.builtin.template', 'ios_template.j2') }}"
538 backup: true
539 backup_options:
540 filename: backup.cfg
541 dir_path: /home/user
542
543 - name: Load configuration from pre-rendered template
544 cisco.ios.ios_config:
545 content: |
546 interface GigabitEthernet0/1
547 description Uplink to Core
548 ip address 10.1.1.1 255.255.255.0
549 no shutdown
550
551 - name: Configure Access Session Attributes while handlening prompt
552 cisco.ios.ios_config:
553 lines:
554 - config_line: access-session authentication attributes filter-spec include list test_filter
555 - config_line: access-session accounting attributes filter-spec include list test_filter
556 prompt: "Do you wish to continue? [yes]:"
557 answer: "yes"
558 save_when: "changed"
559
560 # Task Output :
561 # --------
562 #
563 # banners: {}
564 # commands:
565 # - access-session authentication attributes filter-spec include list mylist
566 # - access-session accounting attributes filter-spec include list mylist
567 # invocation:
568 # module_args:
569 # after: null
570 # backup: false
571 # backup_options: null
572 # before: null
573 # defaults: false
574 # diff_against: null
575 # diff_ignore_lines: null
576 # intended_config: null
577 # lines:
578 # - config_line: access-session authentication attributes filter-spec include list mylist
579 # - answer: "yes"
580 # config_line: access-session accounting attributes filter-spec include list mylist
581 # prompt: "Do you wish to continue? [yes]:"
582 # match: line
583 # multiline_delimiter: '@'
584 # parents: null
585 # replace: line
586 # running_config: null
587 # save_when: changed
588 # src: null
589 # updates:
590 # - access-session authentication attributes filter-spec include list mylist
591 # - access-session accounting attributes filter-spec include list mylist
592
593
594 # Example ios_template.j2
595 # ip access-list extended test
596 # permit ip host 192.0.2.1 any log
597 # permit ip host 192.0.2.2 any log
598 # permit ip host 192.0.2.3 any log
599 # permit ip host 192.0.2.4 any log
600
601
602
603 Return Values
604 -------------
605 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:
606
607 .. raw:: html
608
609 <table border=0 cellpadding=0 class="documentation-table">
610 <tr>
611 <th colspan="1">Key</th>
612 <th>Returned</th>
613 <th width="100%">Description</th>
614 </tr>
615 <tr>
616 <td colspan="1">
617 <div class="ansibleOptionAnchor" id="return-"></div>
618 <b>backup_path</b>
619 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
620 <div style="font-size: small">
621 <span style="color: purple">string</span>
622 </div>
623 </td>
624 <td>when backup is yes</td>
625 <td>
626 <div>The full path to the backup file</div>
627 <br/>
628 <div style="font-size: smaller"><b>Sample:</b></div>
629 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">/playbooks/ansible/backup/ios_config.2016-07-16@22:28:34</div>
630 </td>
631 </tr>
632 <tr>
633 <td colspan="1">
634 <div class="ansibleOptionAnchor" id="return-"></div>
635 <b>commands</b>
636 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
637 <div style="font-size: small">
638 <span style="color: purple">list</span>
639 </div>
640 </td>
641 <td>always</td>
642 <td>
643 <div>The set of commands that will be pushed to the remote device</div>
644 <br/>
645 <div style="font-size: smaller"><b>Sample:</b></div>
646 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;hostname foo&#x27;, &#x27;router ospf 1&#x27;, &#x27;router-id 192.0.2.1&#x27;]</div>
647 </td>
648 </tr>
649 <tr>
650 <td colspan="1">
651 <div class="ansibleOptionAnchor" id="return-"></div>
652 <b>date</b>
653 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
654 <div style="font-size: small">
655 <span style="color: purple">string</span>
656 </div>
657 </td>
658 <td>when backup is yes</td>
659 <td>
660 <div>The date extracted from the backup file name</div>
661 <br/>
662 <div style="font-size: smaller"><b>Sample:</b></div>
663 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">2016-07-16</div>
664 </td>
665 </tr>
666 <tr>
667 <td colspan="1">
668 <div class="ansibleOptionAnchor" id="return-"></div>
669 <b>filename</b>
670 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
671 <div style="font-size: small">
672 <span style="color: purple">string</span>
673 </div>
674 </td>
675 <td>when backup is yes and filename is not specified in backup options</td>
676 <td>
677 <div>The name of the backup file</div>
678 <br/>
679 <div style="font-size: smaller"><b>Sample:</b></div>
680 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">ios_config.2016-07-16@22:28:34</div>
681 </td>
682 </tr>
683 <tr>
684 <td colspan="1">
685 <div class="ansibleOptionAnchor" id="return-"></div>
686 <b>shortname</b>
687 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
688 <div style="font-size: small">
689 <span style="color: purple">string</span>
690 </div>
691 </td>
692 <td>when backup is yes and filename is not specified in backup options</td>
693 <td>
694 <div>The full path to the backup file excluding the timestamp</div>
695 <br/>
696 <div style="font-size: smaller"><b>Sample:</b></div>
697 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">/playbooks/ansible/backup/ios_config</div>
698 </td>
699 </tr>
700 <tr>
701 <td colspan="1">
702 <div class="ansibleOptionAnchor" id="return-"></div>
703 <b>time</b>
704 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
705 <div style="font-size: small">
706 <span style="color: purple">string</span>
707 </div>
708 </td>
709 <td>when backup is yes</td>
710 <td>
711 <div>The time extracted from the backup file name</div>
712 <br/>
713 <div style="font-size: smaller"><b>Sample:</b></div>
714 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">22:28:34</div>
715 </td>
716 </tr>
717 <tr>
718 <td colspan="1">
719 <div class="ansibleOptionAnchor" id="return-"></div>
720 <b>updates</b>
721 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
722 <div style="font-size: small">
723 <span style="color: purple">list</span>
724 </div>
725 </td>
726 <td>always</td>
727 <td>
728 <div>The set of commands that will be pushed to the remote device</div>
729 <br/>
730 <div style="font-size: smaller"><b>Sample:</b></div>
731 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;hostname foo&#x27;, &#x27;router ospf 1&#x27;, &#x27;router-id 192.0.2.1&#x27;]</div>
732 </td>
733 </tr>
734 </table>
735 <br/><br/>
736
737
738 Status
739 ------
740
741
742 Authors
743 ~~~~~~~
744
745 - Peter Sprygada (@privateip)