-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbackup-all.yml
36 lines (30 loc) · 965 Bytes
/
backup-all.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Backup the entire network infrastructure
---
- name: Backup all devices
gather_facts: false
connection: local
hosts: all
collections:
- lvrfrc87.git_acp
- gmoisio.ale.ale_aos_command
tasks:
# Backup configuration through CLI
- name: IMPORT >> backup configuration
include_tasks: backup-aos6.yml
when: device_os == 'aos6'
# Read backup files from remote git
- name: IMPORT >> clone repository
import_tasks: backup-to-git-clone.yml
when: backup_git
# Backup configuration through REST API
- name: IMPORT >> backups configuration
include_tasks: backup-aos8.yml
when: device_os == 'aos8'
# Write backup file to local directory
- name: IMPORT >> backups configuration
import_tasks: backup-to-local.yml
when: backup_local
# Write backup file to remote git
- name: IMPORT >> backups configuration
import_tasks: backup-to-git.yml
when: backup_git