From b4eb13fda32790bac0acd8c922398b6cebd0f54b Mon Sep 17 00:00:00 2001 From: Bogdan Dobrelya Date: Tue, 13 Oct 2015 12:09:53 +0200 Subject: [PATCH] Make multiple networks only when PREPROVISIONED Signed-off-by: Bogdan Dobrelya --- Vagrantfile | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index f7b888f8..fe97b07f 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -126,7 +126,12 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.provision "shell", inline: slave_script, privileged: true config.vm.provision "shell", inline: solar_script, privileged: true config.vm.provision "shell", inline: slave_celery, privileged: true - config.vm.network "private_network", ip: "10.0.0.#{ip_index}" + #TODO(bogdando) figure out how to configure multiple interfaces when was not PREPROVISIONED + ind = 0 + SLAVES_IPS.each do |ip| + config.vm.network :private_network, ip: "#{ip}#{ip_index}", :dev => "solbr#{ind}", :mode => 'nat' + ind = ind + 1 + end else # Disable attempts to install guest os and check that node is booted using ssh, # because nodes will have ip addresses from dhcp, and vagrant doesn't know @@ -171,12 +176,6 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| rsync__args: ["--verbose", "--archive", "--delete", "-z"] end end - - ind = 0 - SLAVES_IPS.each do |ip| - config.vm.network :private_network, ip: "#{ip}#{ip_index}", :dev => "solbr#{ind}", :mode => 'nat' - ind = ind + 1 - end end end