Make multiple networks only when PREPROVISIONED

Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
This commit is contained in:
Bogdan Dobrelya 2015-10-13 12:09:53 +02:00
parent 4340bd2e93
commit b4eb13fda3

13
Vagrantfile vendored
View File

@ -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: slave_script, privileged: true
config.vm.provision "shell", inline: solar_script, privileged: true config.vm.provision "shell", inline: solar_script, privileged: true
config.vm.provision "shell", inline: slave_celery, 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 else
# Disable attempts to install guest os and check that node is booted using ssh, # 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 # 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"] rsync__args: ["--verbose", "--archive", "--delete", "-z"]
end end
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
end end