Skip to content

vzhovtan/ansible-network-backup

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

published

Ansible Network Backup

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.

Requirements

Currently supports:

  • Cisco IOS XE
  • Cisco NX OS
  • Cisco ASA

Role Variables

  • 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
  • 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 specified
  • git_email: Set the user's git email when not otherwise specified

Dependencies

None

Cloning

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

Example Playbook

- hosts: network
  gather_facts: no
  connection: network_cli
  tasks:
    - include_role:
        name: network-backup
      vars:
        network_backup_repository: '[email protected]:repo/backups.git'

License

CISCO SAMPLE CODE LICENSE.

About

An Ansible Role to backup network devices

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published