phinze/landrush — pull request #57 by amfranz (2014-04-10 19:47:27+00:00)
Title: Proper merging of configuration settings.

Refactored configuration according to the guidelines at
http://docs.vagrantup.com/v2/plugins/configuration.html

Previously, in a multi-VM Vagrantfile, most landrush settings that were
globally set would not be inherited to the VMs, which made it necessary to
re-define them for each and every VM.

The changes in this commit make it possible to define configuration settings
once in a multi-VM Vagrantfile and have them inherited to all the machines, but
still allow the settings to be overriden on a per-VM basis:

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Default Landrush settings for all VMs
config.landrush.enable
config.landrush.tld = 'custom.dev'
config.landrush.guest_redirect_dns = true

config.vm.define 'box1' do |cfg|
# Landrush settings will be inherited

# For this VM:
# - landrush is still enabled
# - the tld is still 'custom.dev'
# - guest_redirect_dns is still true

# ...
end

config.vm.define 'box2' do |cfg|
# Landrush settings will be inherited and can be overwritten
cfg.landrush.guest_redirect_dns = false

# For this VM:
# - landrush is still enabled
# - the tld is still 'custom.dev'
# - but guest_redirect_dns is false for this VM only

# ...
end
end