12-20-2019 12:55 PM
I am trying to understand the syntax to make a playbook to backup NX-OS devices.
I am reading the following link:
https://docs.ansible.com/ansible/latest/network/user_guide/platform_nxos.html
However, I am not connecting the dots - does anyone have a simple playbook that backups up NX-OS config to a remote Linux server, so I can learn how to use Ansible. I am not looking for a direct copy and paste script, since I want to learn, just need some direction so I can build my Lego blocks onto.
Thank you
12-20-2019 01:17 PM
here is couple of pointers to start with :
https://www.trueneutral.eu/2019/ansible-cfg-git.html
https://github.com/ciscops/ansible-network-backup
https://github.com/fajarfathurrahman/Ansible-Backup-Cisco-Config
12-20-2019 01:26 PM
Thank you for the links. It does make sense; however, do you know if you can just change the 'git' repo with just a directory path of the ansible server? ++laugh++ I know nothing of git.
12-20-2019 02:08 PM - edited 12-20-2019 02:14 PM
the scripts are easy to understand and deployed nicely.
if you have Linux server - ubunut or debian
Login as root
#apt-get install git <-- press Y, to install git here.
once installed.
make directory (on Linux, Hope you know this i guess).
if you dont know below command :
#mkdir mybackup
#cd mybackup
example to get git code to my backup directory
git clone git@github.com:ciscops/ansible-network-backup.git network-backup
once it cloned read the .yml file and understand, before executing any commands.
====
I know you have mentioned you want to learn and do it, make a simulated lab for testing purpose.
I started here :
https://docs.ansible.com/ansible/latest/network/getting_started/index.html
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide