forked from th3architect/citc-evpn-symmetric
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.yml
54 lines (41 loc) · 1.35 KB
/
deploy.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
49
50
51
52
53
54
---
- hosts: leaf,spine
become: true
gather_facts: false
tasks:
- name: Copy over interfaces
copy: src=./flatfiles/{{inventory_hostname}}/interfaces dest=/etc/network/interfaces
notify: reload networking
- name: Copy over daemons
copy: src=./flatfiles/{{inventory_hostname}}/daemons dest=/etc/frr/daemons
notify: restart frr
- name: Copy over frr
copy: src=./flatfiles/{{inventory_hostname}}/frr.conf dest=/etc/frr/frr.conf
notify: reload frr
handlers:
- name: reload networking
shell: ifreload -a
- name: restart frr
service: name=frr state=restarted
- name: reload frr
service: name=frr state=reloaded
- hosts: host
become: true
tasks:
- name: Copy over interfaces
copy: src=./flatfiles/{{ansible_hostname}}/interfaces dest=/etc/network/interfaces
- name: bring up interfaces
shell: ifup eth1 && ifup eth2 && ifup uplink
- name: Workaround for CITC server behaviour1
shell: ethtool -s eth1 speed 1000 duplex full
- name: Workaround for CITC server behaviour eth2
shell: ethtool -s eth2 speed 1000 duplex full
- name: Apply workaround by restarting networking
shell: systemctl restart networking
handlers:
- name: reload networking
shell: ifreload -a
- name: restart frr
service: name=frr state=restarted
- name: reload frr
service: name=frr state=reloaded