diff --git a/lib/ansible/module_utils/vmware.py b/lib/ansible/module_utils/vmware.py index 79d3627291c..b38ede8b88a 100644 --- a/lib/ansible/module_utils/vmware.py +++ b/lib/ansible/module_utils/vmware.py @@ -67,8 +67,9 @@ def wait_for_vm_ip(content, vm, timeout=300): facts = dict() interval = 15 while timeout > 0: - facts = gather_vm_facts(content, vm) - if facts['ipv4'] or facts['ipv6']: + _facts = gather_vm_facts(content, vm) + if _facts['ipv4'] or _facts['ipv6']: + facts = _facts break time.sleep(interval) timeout -= interval