.. _ansible.netcommon.cli_backup_module: **************************** ansible.netcommon.cli_backup **************************** **Back up device configuration from network devices over network_cli** Version added: 4.2.0 .. contents:: :local: :depth: 1 Synopsis -------- - This module provides platform agnostic way of backing up text based configuration from network devices over network_cli connection plugin. Parameters ---------- .. raw:: html
Parameter Choices/Defaults Comments
defaults
boolean
    Choices:
  • no ←
  • yes
The defaults 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.
dir_path
path
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 filename or default filename as described in filename options description. If the path value is not given in that case a backup directory will be created in the current working directory and backup configuration will be copied in filename within backup directory.
filename
string
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 <hostname>_config.<current-date>@<current-time>

Notes ----- .. note:: - This module is supported on ``ansible_network_os`` network platforms. See the :ref:`Network 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 `_, the following are the fields unique to this module: .. raw:: html
Key Returned Description
backup_path
string
always
The full path to the backup file

Sample:
/playbooks/ansible/backup/hostname_config.2016-07-16@22:28:34


Status ------ Authors ~~~~~~~ - Kate Case (@Qalthos)