Run "up" in a batch action so it parallelizes
This commit is contained in:
parent
3d8271a3a2
commit
54f7930b84
|
@ -29,13 +29,21 @@ module VagrantPlugins
|
||||||
|
|
||||||
# Go over each VM and bring it up
|
# Go over each VM and bring it up
|
||||||
@logger.debug("'Up' each target VM...")
|
@logger.debug("'Up' each target VM...")
|
||||||
|
|
||||||
|
# Build up the batch job of what we'll do
|
||||||
|
batch = Vagrant::BatchAction.new.tap do |inner_batch|
|
||||||
with_target_vms(argv, :provider => options[:provider]) do |machine|
|
with_target_vms(argv, :provider => options[:provider]) do |machine|
|
||||||
@env.ui.info(I18n.t(
|
@env.ui.info(I18n.t(
|
||||||
"vagrant.commands.up.upping",
|
"vagrant.commands.up.upping",
|
||||||
:name => machine.name,
|
:name => machine.name,
|
||||||
:provider => machine.provider_name))
|
:provider => machine.provider_name))
|
||||||
machine.action(:up, options)
|
|
||||||
|
inner_batch.action(machine, :up, options)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# Run it!
|
||||||
|
batch.run
|
||||||
|
|
||||||
# Success, exit status 0
|
# Success, exit status 0
|
||||||
0
|
0
|
||||||
|
|
Loading…
Reference in New Issue