Automate Mikrotik RouterOS Config Backups with Ansible
By Luca Berton · Published 2024-01-01 · Category: installation
Learn how to automate configuration backups for Mikrotik RouterOS with Ansible. This guide includes a step-by-step Playbook example for seamless backups using SSH and file management.
How to Backup Config on Mikrotik RouterOS with Ansible? Maintaining a backup copy of your network appliance configuration is a good practice for all IT Professionals. You could automate this process for Mikrotik RouterOS appliances using Ansible. I'm going to show you a live Playbook with some simple Ansible code. I'm Luca Berton and welcome to today's episode of Ansible Pilot.
Ansible Backup Config on Mikrotik RouterOS
> community.routeros: Modules for MikroTik RouterOS
Let's talk about the Ansible collection community.routeros. The full name is community.routeros, which means that is an Ansible Network Collection designed to interact with Mikrotik RouterOS devices. It contains modules for MikroTik RouterOS.
Links • Community.Routeros
## Playbook
How to Backup Config on Mikrotik RouterOS with Ansible Playbook. I'm going to show how to back up the current configuration of a Mikrotik RouterOS connecting via SSH protocol using the username and password credentials and save it to a file with the device name and timestamp.
code • inventory • backup_mikrotik.yml • requirements.yml
requirements setup
execution
before execution
after execution
Conclusion Now you know how to Backup Config on Mikrotik RouterOS with Ansible.
Related Articles • Ansible Galaxy Guide • Ansible when Conditional Guide • Ansible Inventory Guide
Category: installation
Watch the video: Automate Mikrotik RouterOS Config Backups with Ansible — Video Tutorial