vagrant-landrush / landrush

A Vagrant plugin that provides a simple DNS server for Vagrant guests
MIT License
666 stars 78 forks source link

Read IP from guest even if there's just 1 private network #246

Closed njam closed 7 years ago

njam commented 8 years ago

Fixes https://github.com/vagrant-landrush/landrush/issues/268

In case we want to use the public network's address.

For example my box has a private and a public address:

    config.vm.network :private_network, ip: '10.10.11.10'
    config.vm.network :public_network, :bridge => 'en0: Wi-Fi (AirPort)'

And I want to use the public one with:

config.landrush.host_interface = 'eth2'

For this we will need to use read_host_visible_ip_address.

@hferentschik wdyt?

njam commented 7 years ago

@hferentschik wdyt?

hferentschik commented 7 years ago

So you want to skip the case in which the private network is automatically selected in case it is the sole private network, right? I guess this makes sense. I might have been a bit hasty when I added this "optimisation".

Do we have an actual issue for that and if not, do you mind creating one? At first glance this looks fine.

njam commented 7 years ago

You mean to have a separate issue? Like this? https://github.com/vagrant-landrush/landrush/issues/268

Good to merge?

hferentschik commented 7 years ago

You mean to have a separate issue? Like this? #268

Perfect :-)

hferentschik commented 7 years ago

Good to merge?

Merged, thanks :-)