17 lines
457 B
YAML
17 lines
457 B
YAML
|
|
---
|
||
|
|
- name: Back up MikroTik switch configuration
|
||
|
|
hosts: mikrotik
|
||
|
|
gather_facts: false
|
||
|
|
tasks:
|
||
|
|
- name: Ensure local backup directory exists
|
||
|
|
ansible.builtin.file:
|
||
|
|
path: "{{ playbook_dir }}/backups/{{ inventory_hostname }}"
|
||
|
|
state: directory
|
||
|
|
mode: "0755"
|
||
|
|
delegate_to: localhost
|
||
|
|
|
||
|
|
- name: Run backup tasks
|
||
|
|
ansible.builtin.include_role:
|
||
|
|
name: makerfloss.mikrotik_switch
|
||
|
|
tasks_from: backup.yml
|