-
Notifications
You must be signed in to change notification settings - Fork 1
/
deploy_mgr.yml
44 lines (44 loc) · 1.97 KB
/
deploy_mgr.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
---
- name: Deploy NSX-T Mgr OVA
hosts: localhost
gather_facts: False
tasks:
- name: deploy NSX Manager
deploy_ova:
ovftool_path: "{{ hostvars['localhost'].ovfToolPath }}"
datacenter: "{{ hostvars[item]['dc'] }}"
datastore: "{{ hostvars[item]['datastore'] }}"
portgroup: "{{ hostvars[item]['portgroup'] }}"
cluster: "{{ hostvars[item]['cluster'] }}"
vmname: "{{ hostvars[item]['vmname'] }}"
hostname: "{{ hostvars[item]['hostname'] }}"
dns_server: "{{ hostvars['localhost'].dns_server }}"
dns_domain: "{{ hostvars['localhost'].dns_domain }}"
ntp_server: "{{ hostvars['localhost'].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'].managerOva }}"
vcenter: "{{ hostvars['localhost'].deployVcIPAddress }}"
vcenter_user: "{{ hostvars['localhost'].deployVcUser }}"
vcenter_passwd: "{{ hostvars['localhost'].deployVcPassword }}"
deployment_size: "{{ hostvars['localhost'].nsx_t_mgr_deploy_size }}"
resource_pool: "{{ hostvars[item].resource_pool }}"
with_items: "{{ groups['nsxmanagers'] }}"
async: 7200
poll: 0
register: deploy_nsx_man
- name: Wait 3 minutes before starting to verify the deployment
pause: minutes=3
- name: Check if NSX Managers deployment has finished
async_status:
jid: "{{ item.ansible_job_id }}"
register: job_result
until: job_result.finished
with_items: "{{ deploy_nsx_man.results }}"
retries: 100