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
1 changed files with 6 additions and 7 deletions

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: 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