This role backs up the configuration of a network device into a git repository.
The file is backed up to the directory specified in network_backup_dir
. A git repo is used when
network_backup_repository
is specified.
Currently supports:
- Cisco IOS XE
- Cisco NX OS
- Cisco ASA
network_backup_repository
: The git repository that will be use to store the backups- Backups will not be pushed to git when
network_backup_repository
is not specified
- Backups will not be pushed to git when
network_backup_dir
: The directory where the backups will be placed. Default:"{{ playbook_dir }}/backups"
network_backup_dir
will be created when it does not exist
git_name
: Set the user's git name when not otherwise specifiedgit_email
: Set the user's git email when not otherwise specified
None
Adding without the ansible-
prefix:
git clone [email protected]:ciscops/ansible-network-backup.git network-backup
Adding as a submodule:
git submodule add [email protected]:ciscops/ansible-network-backup.git network-backup
- hosts: network
gather_facts: no
connection: network_cli
tasks:
- include_role:
name: network-backup
vars:
network_backup_repository: '[email protected]:repo/backups.git'