This repository has been archived by the owner on May 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path003_deploy_edges.yml
67 lines (63 loc) · 2.22 KB
/
003_deploy_edges.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
62
63
64
65
66
67
---
#
# Playbook to register Compute Manager with NSX Appliance, Create IP Pools
#
#
- hosts: 127.0.0.1
connection: local
become: yes
vars_files:
- answerfiles/first_site.yml
tasks:
- name: Create Edge Transport Node 1
nsxt_transport_nodes:
hostname: "{{ nsxt_vip }}"
username: "{{ nsx_username }}"
password: "{{ nsx_password }}"
validate_certs: "{{ validate_certs }}"
display_name: "{{ item.display_name }}"
host_switch_spec:
resource_type: StandardHostSwitchSpec
host_switches: "{{ item.host_switches }}"
transport_zone_endpoints: "{{ item.transport_zone_endpoints }}"
node_deployment_info: "{{ item.node_deployment_info }}"
state: "{{ state }}"
with_items:
- "{{ transport_nodes_edge_1 }}"
- name: Sleeping for 45 seconds
wait_for:
timeout: 45
delegate_to: localhost
- name: Create Edge Transport Node 2
nsxt_transport_nodes:
hostname: "{{ nsxt_vip }}"
username: "{{ nsx_username }}"
password: "{{ nsx_password }}"
validate_certs: "{{ validate_certs }}"
display_name: "{{ item.display_name }}"
host_switch_spec:
resource_type: StandardHostSwitchSpec
host_switches: "{{ item.host_switches }}"
transport_zone_endpoints: "{{ item.transport_zone_endpoints }}"
node_deployment_info: "{{ item.node_deployment_info }}"
state: "{{ state }}"
with_items:
- "{{ transport_nodes_edge_2 }}"
- name: Create Edge Cluster
nsxt_edge_clusters:
hostname: "{{ nsxt_vip }}"
username: "{{ nsx_username }}"
password: "{{ nsx_password }}"
validate_certs: "{{ validate_certs }}"
display_name: "{{ item.display_name }}"
members:
- transport_node_name: "{{ transport_nodes_edge_1[0].display_name }}"
- transport_node_name: "{{ transport_nodes_edge_2[0].display_name }}"
state: "{{ state }}"
with_items:
- "{{ edge_clusters }}"
# Sleeping so the cluster can come up
- name: Sleeping for 8 Minutes - Waiting for Edge Cluster to Establish
wait_for:
timeout: 480
delegate_to: localhost