From 7f016008130348793789cb930de365ea32c307d4 Mon Sep 17 00:00:00 2001 From: luto Date: Wed, 25 Nov 2015 17:14:19 +0100 Subject: [PATCH] vsphere_guest: when creating a guest, gather facts about it *before* disconnect --- cloud/vmware/vsphere_guest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cloud/vmware/vsphere_guest.py b/cloud/vmware/vsphere_guest.py index bee13ed4210..8861fbc244d 100644 --- a/cloud/vmware/vsphere_guest.py +++ b/cloud/vmware/vsphere_guest.py @@ -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)