cli_restore¶
Collection Note
This module is part of the ansible.netcommon collection. To install the collection, use:
Added in version6.1.0.
Synopsis¶
- This module provides platform agnostic way of restore text based configuration to network devices over network_cli connection plugin.
- The module uses the platforms
config replacecommands to restore backup configuration that is already copied over to the appliance.
Parameters¶
| Parameter | Defaults / Choices | Comments |
|---|---|---|
| filename str |
Filename of the backup file, present in the appliance where the restore operation is to be performed. Check appliance for the configuration backup file name. | |
| path str |
The location in the target appliance where the file containing the backup exists. The path and the filename together create the input to the config replace command, For an IOSXE appliance the path pattern is flash:// |
Notes¶
Note
- This module is supported on C(ansible_network_os) network platforms. See the :ref:
Network Platform Options <platform_options>for details.
Examples¶
- name: Restore IOS-XE configuration
ansible.netcommon.cli_restore:
filename: backupDday.cfg
path: flash://
# Command fired
# -------------
# config replace flash://backupDday.cfg force
# Task Output
# -----------
#
# ok: [BATMON] => changed=false
# __restore__: |-
# The rollback configlet from the last pass is listed below:
# ********
# !List of Rollback Commands:
# Building configuration...
# Current configuration : 3781 bytes
# end
# ********
#
#
# Rollback aborted after 5 passes
# The following commands are failed to apply to the IOS image.
# ********
# Building configuration...
# Current configuration : 3781 bytes
# ********
# invocation:
# module_args:
# filename: backupDday.cfg
Authors¶
- Sagar Paul (@kb-Perbyte)