From d5582d71178e0d9aadc2aa5229f48bc7842af57d Mon Sep 17 00:00:00 2001 From: "Scott S. Lowe" Date: Fri, 11 Nov 2016 09:16:45 -0700 Subject: [PATCH] Update Vagrantfile to support DHCP Update Vagrantfile to support DHCP-assigned IP addresses for additional networks Signed-off-by: Scott S. Lowe --- complex-yaml/Vagrantfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/complex-yaml/Vagrantfile b/complex-yaml/Vagrantfile index 6745134..ed0d192 100644 --- a/complex-yaml/Vagrantfile +++ b/complex-yaml/Vagrantfile @@ -42,7 +42,11 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # Iterate through networks as per settings in machines.yml machine['nics'].each do |net| - srv.vm.network net['type'], ip: net['ip_addr'] + if net['ip_addr'] == 'dhcp' + srv.vm.network net['type'], type: net['ip_addr'] + else + srv.vm.network net['type'], ip: net['ip_addr'] + end # if net['ip_addr'] end # machine['nics'].each # Configure CPU & RAM per settings in machines.yml (Fusion)