forked from mpinizzotto/nsx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy_vxlanprep_c2.yml
63 lines (54 loc) · 2 KB
/
deploy_vxlanprep_c2.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
---
- name: Configuring VXLAN for Cluster "{{ targetClusters.cluster2.clusterName }}"
hosts: localhost
connection: local
gather_facts: False
vars_files:
- answerfile_deploy.yml
tasks:
- name: gather moid for cluster
vcenter_gather_moids:
hostname: "{{ vcHostname }}"
username: "{{ vcUser }}"
password: "{{ vcPassword }}"
datacenter_name: "{{ nsxmgr.datacenter }}"
cluster_name: "{{ targetClusters.cluster2.clusterName }}"
validate_certs: False
register: gather_moids_cl
tags: create_controller_cluster
- name: gather moid for dvs
vcenter_gather_moids:
hostname: "{{ vcHostname }}"
username: "{{ vcUser }}"
password: "{{ vcPassword }}"
datacenter_name: "{{ nsxmgr.datacenter }}"
dvs_name: "{{ targetClusters.cluster2.dvs }}"
validate_certs: False
register: gather_moids_dvs
tags: create_controller_cluster
- name: VTEP IP pool creation
nsx_ippool:
nsxmanager_spec: "{{ nsxmanager_spec }}"
state: present
name: "{{ nsxIppools.vteps.name }}"
start_ip: "{{ nsxIppools.vteps.start_ip }}"
end_ip: "{{ nsxIppools.vteps.end_ip }}"
prefix_length: "{{ nsxIppools.vteps.prefix_length }}"
gateway: "{{ nsxIppools.vteps.gateway }}"
dns_server_1: "{{ nsxIppools.vteps.dns_server_1 }}"
dns_server_2: "{{ nsxIppools.vteps.dns_server_2 }}"
register: create_vtep_ip_pool
# - debug: var=create_vtep_ip_pool.ippool_id
- name: Cluster2 VXLAN Preparation
nsx_vxlan_prep:
nsxmanager_spec: "{{ nsxmanager_spec }}"
state: present
cluster_moid: "{{ gather_moids_cl.object_id }}"
dvs_moid: "{{ gather_moids_dvs.object_id }}"
ippool_id: "{{ create_vtep_ip_pool.ippool_id }}"
vlan_id: "{{ targetClusters.cluster2.dvs }}"
vmknic_count: "{{ targetClusters.cluster2.vmknic_count }}"
teaming: "{{ targetClusters.cluster2.teaming }}"
mtu: "{{ targetClusters.cluster2.mtu }}"
register: vxlan_prep
# - debug: var=vxlan_prep