-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrestore.yml
48 lines (42 loc) · 1.04 KB
/
restore.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
40
41
42
43
44
45
46
47
48
---
- hosts: all
become_user: yes
handlers:
- name: Restarting switchd
service:
name: switchd
state: restarted
listen: switchd
- name: restart frr
service:
name: frr
state: restart
listen: frr
- name: Reload networking
command: /sbin/ifreload -a
listen: ifreload
tasks:
- name: Restoring /etc/cumulus/ports.conf
copy:
src: backup/{{ ansible_hostname }}/ports.conf
dest: /etc/cumulus/
notify: switchd
- name: Restoring Interfaces configuration
copy:
src: backup/{{ ansible_hostname }}/interfaces
dest: /etc/network/
notify:
- switchd
- ifreload
- name: Restore FRR daemons
copy:
src: backup/{{ ansible_hostname }}/daemons
dest: /etc/frr/daemons
ignore_errors: yes
notify: frr
- name: Restore FRR configurations
copy:
src: backup/{{ ansible_hostname }}/frr.conf
dest: /etc/frr/frr.conf
ignore_errors: yes
notify: frr