Backup_mikrot

Signed-off-by: Reisber <admin@reisber.space>
This commit is contained in:
2026-09-15 14:50:42 +00:00
parent 7f87e51e59
commit 81f7bc24c5
2 changed files with 33 additions and 0 deletions

21
Ansible/backup_daily.yaml Normal file
View File

@@ -0,0 +1,21 @@
---
- name: Backup router
hosts: mikrotik_routers
gather_facts: false
connection: ansible.netcommon.network_cli
tasks:
- name: backup-file create
community.routeros.command:
commands: /system/backup/save dont-encrypt=yes name=backup_mikrotik
- name: backup-file download
net_get:
src: "/backup_mikrotik.backup"
dest: "/ansible-for-games/backups/{{inventory_hostname}}"
protocol: scp
# - name: Save backup with correct hostname
# ansible.builtin.copy:
# src: /ansible-for-games/
# dest: "/ansible-for-games/backups/{{inventory_hostname}}"