|
|
@ -3,6 +3,12 @@
|
|
|
|
# name: pyvmomi
|
|
|
|
# name: pyvmomi
|
|
|
|
# state: latest
|
|
|
|
# state: latest
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Wait for Flask controller to come up online
|
|
|
|
|
|
|
|
wait_for:
|
|
|
|
|
|
|
|
host: "{{ vcsim }}"
|
|
|
|
|
|
|
|
port: 5000
|
|
|
|
|
|
|
|
state: started
|
|
|
|
|
|
|
|
|
|
|
|
- name: store the vcenter container ip
|
|
|
|
- name: store the vcenter container ip
|
|
|
|
set_fact:
|
|
|
|
set_fact:
|
|
|
|
vcsim: "{{ lookup('env', 'vcenter_host') }}"
|
|
|
|
vcsim: "{{ lookup('env', 'vcenter_host') }}"
|
|
|
@ -16,6 +22,12 @@
|
|
|
|
url: "{{ 'http://' + vcsim + ':5000/spawn?datacenter=1&cluster=1&folder=1' }}"
|
|
|
|
url: "{{ 'http://' + vcsim + ':5000/spawn?datacenter=1&cluster=1&folder=1' }}"
|
|
|
|
register: vcsim_instance
|
|
|
|
register: vcsim_instance
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Wait for Flask controller to come up online
|
|
|
|
|
|
|
|
wait_for:
|
|
|
|
|
|
|
|
host: "{{ vcsim }}"
|
|
|
|
|
|
|
|
port: 443
|
|
|
|
|
|
|
|
state: started
|
|
|
|
|
|
|
|
|
|
|
|
- name: get a list of VMS from vcsim
|
|
|
|
- name: get a list of VMS from vcsim
|
|
|
|
uri:
|
|
|
|
uri:
|
|
|
|
url: "{{ 'http://' + vcsim + ':5000/govc_find?filter=VM' }}"
|
|
|
|
url: "{{ 'http://' + vcsim + ':5000/govc_find?filter=VM' }}"
|
|
|
|