-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrestore_running_config.yml
39 lines (36 loc) · 1.46 KB
/
restore_running_config.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
37
38
39
# Copyright 2024 Cisco Systems, Inc. and its affiliates
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
---
- name: Testing playbook to verify backup & restore operations
hosts: localhost
gather_facts: false
vars:
manager_authentication: &manager_authentication
url: # your manager url
username: # your manager username
password: # your manager password
tasks:
- name: Using backup files, create CLI templates for each Edge device
cisco.catalystwan.cli_templates:
state: present
template_name: "backup-template-{{ device_item.filename }}"
template_description: "Template for {{ device_item.hostname }} created from backup file."
config_file: "{{ device_item.backup_path }}"
device_model: vedge-C8000V
manager_credentials:
<<: *manager_authentication
loop: "{{ backup_info.backup_paths }}"
loop_control:
loop_var: device_item
when: backup_info.backup_paths | length > 0
- name: Attach backup templates to the Edge devices
cisco.catalystwan.device_templates:
state: attached
template_name: "backup-template-{{ device_item.filename }}"
hostname: "{{ device_item.hostname }}"
manager_credentials:
<<: *manager_authentication
loop: "{{ backup_info.backup_paths }}"
loop_control:
loop_var: device_item
when: backup_info.backup_paths | length > 0