vsphere_guest: when creating a guest, gather facts about it *before* disconnect

reviewable/pr18780/r1
luto 9 years ago
parent d5ed8381b6
commit 7f01600813

@ -1093,9 +1093,10 @@ def create_vm(vsphere_client, module, esxi, resource_pool, cluster_name, guest,
# Power on the VM if it was requested
power_state(vm, state, True)
vmfacts=gather_facts(vm)
vsphere_client.disconnect()
module.exit_json(
ansible_facts=gather_facts(vm),
ansible_facts=vmfacts,
changed=True,
changes="Created VM %s" % guest)

Loading…
Cancel
Save