lib/kitchen/driver/ec2.rb in kitchen-ec2-0.5.1 vs lib/kitchen/driver/ec2.rb in kitchen-ec2-0.6.0
- old
+ new
@@ -46,10 +46,10 @@
server = create_server
state[:server_id] = server.id
info("EC2 instance <#{state[:server_id]}> created.")
server.wait_for { print "."; ready? } ; print "(server ready)"
- state[:hostname] = server.public_ip_address
+ state[:hostname] = server.public_ip_address || server.private_ip_address
wait_for_sshd(state[:hostname]) ; print "(ssh ready)\n"
debug("ec2:create '#{state[:hostname]}'")
rescue Fog::Errors::Error, Excon::Errors::Error => ex
raise ActionFailed, ex.message
end