Skip to content

Commit

Permalink
Merge pull request #8 from dissonanz/private-ip
Browse files Browse the repository at this point in the history
Use private ip if the public ip is nil
  • Loading branch information
fnichol committed Jul 23, 2013
2 parents 9ed714e + 5b8bd8f commit b5fdda2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/kitchen/driver/ec2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def create(state)

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
Expand Down

0 comments on commit b5fdda2

Please sign in to comment.