Backing up network devices
The next step is to use the inventory file we just tested (nautobot-inventory-01.yml
) and verified with ansible-inventory
to connect to those devices and perform a backup. Make sure to start small and expand from there. Starting small here is just performing configuration backup.
The nice thing about this is we can use a single multi-vendor Ansible core module, as shown here:
- name: "BACKUP ALL CONFIGURATIONS" ansible.netcommon.cli_config: backup: true backup_options: filename: "{{ ansible_host }}.cfg" dir_path: "{{ backups_dir }}/"
The backups_dir
directory is a directory defined earlier in the playbook. Be sure to look at it on your filesystem or in...