diff --git a/lib/vagrant-openstack-plugin/action/read_ssh_info.rb b/lib/vagrant-openstack-plugin/action/read_ssh_info.rb index 6a17399..ac6a818 100644 --- a/lib/vagrant-openstack-plugin/action/read_ssh_info.rb +++ b/lib/vagrant-openstack-plugin/action/read_ssh_info.rb @@ -33,10 +33,8 @@ def read_ssh_info(openstack, machine) if config.network host = server.addresses[config.network].last['addr'] rescue nil - elsif config.address_id - host = server.addresses[config.address_id].last['addr'] rescue nil else - host = server.addresses['public'].last['addr'] rescue nil + host = server.addresses[config.address_id].last['addr'] rescue nil end # Read the DNS info return { diff --git a/lib/vagrant-openstack-plugin/config.rb b/lib/vagrant-openstack-plugin/config.rb index db21869..0fc0a58 100644 --- a/lib/vagrant-openstack-plugin/config.rb +++ b/lib/vagrant-openstack-plugin/config.rb @@ -101,7 +101,7 @@ def finalize! @metadata = nil if @metadata == UNSET_VALUE @username = nil if @username == UNSET_VALUE @network = nil if @network == UNSET_VALUE - @address_id = nil if @address_id == UNSET_VALUE + @address_id = 'public' if @address_id == UNSET_VALUE # Keypair defaults to nil @keypair_name = nil if @keypair_name == UNSET_VALUE