diff --git a/mikrotikbackup.yml b/mikrotikbackup.yml index a3623c2..b558ad7 100644 --- a/mikrotikbackup.yml +++ b/mikrotikbackup.yml @@ -7,7 +7,7 @@ - name: Ensure output directory exists ansible.builtin.file: - path: output + path: /opt/mikrotik_backups state: directory mode: '0755' delegate_to: localhost @@ -42,7 +42,7 @@ - name: Save export to local file ansible.builtin.copy: content: "{{ export_output.stdout }}" - dest: "output/{{ router_name }}-{{ current_date }}.config" + dest: "/opt/mikrotik_backups/{{ router_name }}-{{ current_date }}.config" delegate_to: localhost when: export_output.rc == 0 @@ -52,7 +52,7 @@ when: system_identity.rc == 0 - name: Download binary backup - shell: timeout 15 scp -o StrictHostKeyChecking=no -P {{ ansible_port }} {{ ansible_user }}@{{ ansible_host }}:{{ router_name }}-{{ current_date }}-backup.backup output/ + shell: timeout 15 scp -o StrictHostKeyChecking=no -P {{ ansible_port }} {{ ansible_user }}@{{ ansible_host }}:{{ router_name }}-{{ current_date }}-backup.backup /opt/mikrotik_backups/ delegate_to: localhost when: system_identity.rc == 0