Skip to content

Commit 5bae075

Browse files
Wait till vm ipaddress isn't empty or nil
Fixes #47
1 parent 9d80936 commit 5bae075

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/vSphere/action/get_ssh_info.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def get_ssh_info(connection, machine)
2626
vm = get_vm_by_uuid connection, machine
2727

2828
return nil if vm.nil?
29-
29+
return nil if vm.guest.ipAddress.nil? || vm.guest.ipAddress.empty?
3030
return {
3131
:host => vm.guest.ipAddress,
3232
:port => 22
@@ -35,4 +35,4 @@ def get_ssh_info(connection, machine)
3535
end
3636
end
3737
end
38-
end
38+
end

0 commit comments

Comments
 (0)