-
Notifications
You must be signed in to change notification settings - Fork 1
/
deploy_edge.yml
49 lines (49 loc) · 2.21 KB
/
deploy_edge.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
---
- name: Deploy NSX-T Edge Gw OVA
hosts: localhost
gather_facts: False
tasks:
- name: deploy NSX Edge Gw OVA using default Mgmt vCenter
deploy_ova:
ovftool_path: "{{ hostvars['localhost'].ovfToolPath }}"
datacenter: "{{ hostvars[item]['dc'] }}"
datastore: "{{ hostvars[item]['datastore'] }}"
portgroup: "{{ hostvars[item]['portgroup'] }}"
portgroup_ext: "{{ hostvars[item]['portgroupExt'] }}"
portgroup_transport: "{{ hostvars[item]['portgroupTransport'] }}"
cluster: "{{ hostvars[item]['cluster'] }}"
vmname: "{{ hostvars[item]['vmname'] }}"
hostname: "{{ hostvars[item]['hostname'] }}"
dns_server: "{{ hostvars[item].dns_server }}"
dns_domain: "{{ hostvars[item].dns_domain }}"
ntp_server: "{{ hostvars[item].ntp_server }}"
gateway: "{{ hostvars[item]['gw'] }}"
ip_address: "{{ hostvars[item].ansible_ssh_host }}"
netmask: "{{ hostvars[item]['mask'] }}"
admin_password: "{{ hostvars[item].ansible_ssh_pass }}"
cli_password: "{{ hostvars[item].ansible_ssh_pass }}"
ssh_enabled: "{{ hostvars['localhost'].sshEnabled }}"
allow_ssh_root_login: "{{ hostvars['localhost'].allowSSHRootAccess }}"
path_to_ova: "{{ hostvars['localhost'].nsxOvaPath }}"
ova_file: "{{ hostvars['localhost'].edgeOva }}"
vcenter: "{{ hostvars[item].vcenter_host }}"
vcenter_user: "{{ hostvars[item].vcenter_user }}"
vcenter_passwd: "{{ hostvars[item].vcenter_pwd }}"
deployment_size: "{{ hostvars['localhost'].nsx_t_edge_deploy_size }}"
resource_pool: "{{ hostvars[item].resource_pool }}"
with_items: "{{ groups['nsxedges'] }}"
async: 7200
poll: 0
register: deploy_nsx_edges
- name: Wait 6 minutes before starting to verify the deployment
pause: minutes=6
- name: Check if NSX Edges deployment has finished
async_status:
jid: "{{ item.ansible_job_id }}"
register: job_result
until: job_result.finished
with_items: "{{ deploy_nsx_edges.results }}"
when: deploy_nsx_edges is defined
retries: 200
- name: Wait additional 2 minutes before starting next steps
pause: minutes=2