-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathunset_leaf.yml
40 lines (35 loc) · 1.21 KB
/
unset_leaf.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
---
- name: clean leaf
hosts: leaf
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: "clear config of evpn"
ce_config:
lines: "{{ item.cmd }}"
match: "none"
provider: "{{ cli }}"
ignore_errors: true
with_items:
- { cmd: "undo ospf 1" }
- { cmd: "undo bgp {{ bgp_as_number }}" }
- { cmd: "undo interface {{ if_nve }}" }
- { cmd: "undo interface {{ if_loopback }}" }
- { cmd: "undo interface {{ if_l2sub1 }}" }
- { cmd: "undo interface {{ if_l2sub2 }}" }
- { cmd: "interface {{ if2spine }},clear configuration this" }
- { cmd: "undo interface {{ if_vbdif1 }}" }
- { cmd: "undo interface {{ if_vbdif2 }}" }
- { cmd: "undo bridge-domain {{ bd_id1 }}" }
- { cmd: "undo bridge-domain {{ bd_id2 }}" }
- { cmd: "undo ip vpn-instance {{ vpn_instance }}" }
- { cmd: "undo evpn-overlay enable" }
- { cmd: "interface {{ if_ethtrunk_members }},clear configuration this" }
- { cmd: "undo interface Eth-Trunk{{ if_ethtrunk_id }}" }