Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EXPERIMENT] Regenerate documentation with antsibull-docs #629

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
---
repos:
- repo: https://github.com/ansible-network/collection_prep
rev: 1.1.1
hooks:
- id: update-docs

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
Expand Down
212 changes: 115 additions & 97 deletions docs/ansible.netcommon.cli_backup_module.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
.. _ansible.netcommon.cli_backup_module:

.. Created with antsibull-docs 2.9.0

****************************
ansible.netcommon.cli_backup
****************************
ansible.netcommon.cli_backup module -- Back up device configuration from network devices over network\_cli
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

**Back up device configuration from network devices over network_cli**
This module is part of the `ansible.netcommon collection <https://galaxy.ansible.com/ui/repo/published/ansible/netcommon/>`_ (version 6.1.0).

It is not included in ``ansible-core``.
To check whether it is installed, run ``ansible-galaxy collection list``.

Version added: 4.2.0
To install it, use: :code:`ansible-galaxy collection install ansible.netcommon`.

To use it in a playbook, specify: ``ansible.netcommon.cli_backup``.

New in ansible.netcommon 4.2.0

.. contents::
:local:
Expand All @@ -17,7 +22,13 @@ Version added: 4.2.0

Synopsis
--------
- This module provides platform agnostic way of backing up text based configuration from network devices over network_cli connection plugin.

- This module provides platform agnostic way of backing up text based configuration from network devices over network\_cli connection plugin.

This module has a corresponding action plugin.






Expand All @@ -27,123 +38,130 @@ Parameters

.. raw:: html

<table border=0 cellpadding=0 class="documentation-table">
<tr>
<th colspan="1">Parameter</th>
<th>Choices/<font color="blue">Defaults</font></th>
<th width="100%">Comments</th>
</tr>
<tr>
<td colspan="1">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>defaults</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">boolean</span>
</div>
</td>
<td>
<ul style="margin: 0; padding: 0"><b>Choices:</b>
<li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
<li>yes</li>
</ul>
</td>
<td>
<div>The <em>defaults</em> argument will influence how the running-config is collected from the device. When the value is set to true, the command used to collect the running-config is append with the all keyword. When the value is set to false, the command is issued without the all keyword.</div>
</td>
</tr>
<tr>
<td colspan="1">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>dir_path</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">path</span>
</div>
</td>
<td>
</td>
<td>
<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>
</td>
</tr>
<tr>
<td colspan="1">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>filename</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<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>
</td>
</tr>
</table>
<br/>
<table style="width: 100%;">
<thead>
<tr>
<th><p>Parameter</p></th>
<th><p>Comments</p></th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top">
<div class="ansibleOptionAnchor" id="parameter-defaults"></div>
<p style="display: inline;"><strong>defaults</strong></p>
<a class="ansibleOptionLink" href="#parameter-defaults" title="Permalink to this option"></a>
<p style="font-size: small; margin-bottom: 0;">
<span style="color: purple;">boolean</span>
</p>
</td>
<td valign="top">
<p>The <em>defaults</em> argument will influence how the running-config is collected from the device. When the value is set to true, the command used to collect the running-config is append with the all keyword. When the value is set to false, the command is issued without the all keyword.</p>
<p style="margin-top: 8px;"><b">Choices:</b></p>
<ul>
<li><p><code style="color: blue;"><b>false</b></code> <span style="color: blue;">← (default)</span></p></li>
<li><p><code>true</code></p></li>
</ul>

</td>
</tr>
<tr>
<td valign="top">
<div class="ansibleOptionAnchor" id="parameter-dir_path"></div>
<p style="display: inline;"><strong>dir_path</strong></p>
<a class="ansibleOptionLink" href="#parameter-dir_path" title="Permalink to this option"></a>
<p style="font-size: small; margin-bottom: 0;">
<span style="color: purple;">path</span>
</p>
</td>
<td valign="top">
<p>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 class='docutils literal notranslate'>filename</code> or default filename as described in <code class='docutils literal notranslate'>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 class='docutils literal notranslate'>filename</code> within <em>backup</em> directory.</p>
</td>
</tr>
<tr>
<td valign="top">
<div class="ansibleOptionAnchor" id="parameter-filename"></div>
<p style="display: inline;"><strong>filename</strong></p>
<a class="ansibleOptionLink" href="#parameter-filename" title="Permalink to this option"></a>
<p style="font-size: small; margin-bottom: 0;">
<span style="color: purple;">string</span>
</p>
</td>
<td valign="top">
<p>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;</p>
</td>
</tr>
</tbody>
</table>




Notes
-----

.. note::
- This module is supported on ``ansible_network_os`` network platforms. See the :ref:`Network Platform Options <platform_options>` for details.

- This module is supported on \ :literal:`ansible\_network\_os`\ network platforms. See the :ref:\`Network Platform Options \<platform\_options\>\` for details.


Examples
--------

.. code-block:: yaml


- name: configurable backup path
ansible.netcommon.cli_backup:
filename: backup.cfg
dir_path: /home/user





Return Values
-------------
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:
The following are the fields unique to this module:

.. raw:: html

<table border=0 cellpadding=0 class="documentation-table">
<tr>
<th colspan="1">Key</th>
<th>Returned</th>
<th width="100%">Description</th>
</tr>
<tr>
<td colspan="1">
<div class="ansibleOptionAnchor" id="return-"></div>
<b>backup_path</b>
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>always</td>
<td>
<div>The full path to the backup file</div>
<br/>
<div style="font-size: smaller"><b>Sample:</b></div>
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">/playbooks/ansible/backup/hostname_config.2016-07-16@22:28:34</div>
</td>
</tr>
</table>
<br/><br/>


Status
------
<table style="width: 100%;">
<thead>
<tr>
<th><p>Key</p></th>
<th><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top">
<div class="ansibleOptionAnchor" id="return-backup_path"></div>
<p style="display: inline;"><strong>backup_path</strong></p>
<a class="ansibleOptionLink" href="#return-backup_path" title="Permalink to this return value"></a>
<p style="font-size: small; margin-bottom: 0;">
<span style="color: purple;">string</span>
</p>
</td>
<td valign="top">
<p>The full path to the backup file</p>
<p style="margin-top: 8px;"><b>Returned:</b> always</p>
<p style="margin-top: 8px; color: blue; word-wrap: break-word; word-break: break-all;"><b style="color: black;">Sample:</b> <code>&#34;/playbooks/ansible/backup/hostname_config.2016-07-16@22:28:34&#34;</code></p>
</td>
</tr>
</tbody>
</table>




Authors
~~~~~~~

- Kate Case (@Qalthos)



Collection links
~~~~~~~~~~~~~~~~

* `Issue Tracker <https://github.com/ansible-collections/ansible.netcommon/issues>`__
* `Repository (Sources) <https://github.com/ansible-collections/ansible.netcommon>`__
Loading
Loading