-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdeploy_bgp.yml
61 lines (54 loc) · 2.34 KB
/
deploy_bgp.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
55
56
57
58
59
60
61
---
- name: Enabling BGP on Edges and DLR
hosts: localhost
connection: local
gather_facts: False
vars_files:
- answerfile_deploy.yml
tasks:
- name: Configure BGP on "{{ esg1.name }}"
nsx_esg_bgp:
nsxmanager_spec: "{{ nsxmanager_spec }}"
state: present
edge_name: "{{ esg1.name }}"
localas: "{{ esg1.localas }}"
default_originate: "{{ esg1.default_originate }}"
graceful_restart: "{{ esg1.graceful_restart }}"
router_id: "{{ esg1.router_id }}"
ecmp: "{{ esg1.ecmp }}"
bgp_neighbours:
- { 'ipAddress': "{{ esg1.bgp.n1.ipaddress }}", 'remoteAS': "{{ esg1.bgp.n1.remoteas }}"}
- { 'ipAddress': "{{ esg1.bgp.n2.ipaddress }}", 'remoteAS': "{{ esg1.bgp.n2.remoteas }}"}
- { 'ipAddress': "{{ esg1.bgp.n3.ipaddress }}", 'remoteAS': "{{ esg1.bgp.n3.remoteas }}"}
register: bgp_esg
tags: bgp_esg
- name: Configure BGP on "{{ esg2.name }}"
nsx_esg_bgp:
nsxmanager_spec: "{{ nsxmanager_spec }}"
state: present
edge_name: "{{ esg2.name }}"
localas: "{{ esg2.localas }}"
default_originate: "{{ esg2.default_originate }}"
graceful_restart: "{{ esg2.graceful_restart }}"
router_id: "{{ esg2.router_id }}"
ecmp: "{{ esg2.ecmp }}"
bgp_neighbours:
- { 'ipAddress': "{{ esg2.bgp.n1.ipaddress }}", 'remoteAS': "{{ esg2.bgp.n1.remoteas }}"}
- { 'ipAddress': "{{ esg2.bgp.n2.ipaddress }}", 'remoteAS': "{{ esg2.bgp.n2.remoteas }}"}
- { 'ipAddress': "{{ esg2.bgp.n3.ipaddress }}", 'remoteAS': "{{ esg2.bgp.n3.remoteas }}"}
register: bgp_esg
tags: bgp_esg
- name: Configure BPG on "{{ dlr.name }}"
nsx_dlr_bgp:
nsxmanager_spec: "{{ nsxmanager_spec }}"
state: present
edge_name: "{{ dlr.name }}"
localas: "{{ dlr.localas }}"
router_id: "{{ dlr.router_id }}"
graceful_restart: "{{ dlr.graceful_restart }}"
ecmp: "{{ dlr.ecmp }}"
bgp_neighbours:
- { 'ipAddress': "{{ dlr.bgp.n1.ipaddress }}", 'remoteAS': "{{ dlr.bgp.n1.remoteas }}", 'forwardingAddress': "{{ dlr.vnic0.ip }}", 'protocolAddress': "{{ dlr.protocol_address }}" }
- { 'ipAddress': "{{ dlr.bgp.n2.ipaddress }}", 'remoteAS': "{{ dlr.bgp.n2.remoteas }}", 'forwardingAddress': "{{ dlr.vnic0.ip }}", 'protocolAddress': "{{ dlr.protocol_address }}"}
register: bgp_dlr
tags: bgp_dlr