Run "up" in a batch action so it parallelizes
This commit is contained in:
parent
3d8271a3a2
commit
54f7930b84
|
@ -29,14 +29,22 @@ 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...")
|
||||||
with_target_vms(argv, :provider => options[:provider]) do |machine|
|
|
||||||
@env.ui.info(I18n.t(
|
# Build up the batch job of what we'll do
|
||||||
"vagrant.commands.up.upping",
|
batch = Vagrant::BatchAction.new.tap do |inner_batch|
|
||||||
:name => machine.name,
|
with_target_vms(argv, :provider => options[:provider]) do |machine|
|
||||||
:provider => machine.provider_name))
|
@env.ui.info(I18n.t(
|
||||||
machine.action(:up, options)
|
"vagrant.commands.up.upping",
|
||||||
|
:name => machine.name,
|
||||||
|
:provider => machine.provider_name))
|
||||||
|
|
||||||
|
inner_batch.action(machine, :up, options)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Run it!
|
||||||
|
batch.run
|
||||||
|
|
||||||
# Success, exit status 0
|
# Success, exit status 0
|
||||||
0
|
0
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue