Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Todd Ruch committed Sep 5, 2024
1 parent 0975f27 commit 7eee47c
Showing 1 changed file with 19 additions and 20 deletions.
39 changes: 19 additions & 20 deletions network/backup.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- name: Backup Devices
hosts: routers
gather_facts: true
gather_facts: false
vars:
report_server: reports
web_path: /tmp/backup
Expand All @@ -15,26 +15,25 @@
operation: backup
type: full
data_store:
local: "./network_local_backup/network"
register: backup_result
local: "./network_local_backup"

- name: Debug result
ansible.builtin.debug:
msg: "{{ backup_result.backup_path }}"
# - name: Debug result
# ansible.builtin.debug:
# msg: "{{ ansible_facts }}"

- name: Copy backup to backup server
become: true
delegate_to: "{{ report_server }}"
block:
- name: Create a backup directory if it does not exist
ansible.builtin.file:
path: "{{ web_path }}"
state: directory
mode: '0755'
# - name: Copy backup to backup server
# become: true
# delegate_to: "{{ report_server }}"
# block:
# - name: Create a backup directory if it does not exist
# ansible.builtin.file:
# path: "{{ web_path }}"
# state: directory
# mode: '0755'

- name: Copy backup file
ansible.builtin.copy:
src: "{{ backup_result.backup_path }}"
dest: "{{ web_path }}"
# - name: Copy backup file
# ansible.builtin.copy:
# src: "{{ backup_result.backup_path }}"
# dest: "{{ web_path }}"

...
# ...

0 comments on commit 7eee47c

Please sign in to comment.