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
|
||||
@logger.debug("'Up' each target VM...")
|
||||
with_target_vms(argv, :provider => options[:provider]) do |machine|
|
||||
@env.ui.info(I18n.t(
|
||||
"vagrant.commands.up.upping",
|
||||
:name => machine.name,
|
||||
:provider => machine.provider_name))
|
||||
machine.action(:up, options)
|
||||
|
||||
# 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|
|
||||
@env.ui.info(I18n.t(
|
||||
"vagrant.commands.up.upping",
|
||||
:name => machine.name,
|
||||
:provider => machine.provider_name))
|
||||
|
||||
inner_batch.action(machine, :up, options)
|
||||
end
|
||||
end
|
||||
|
||||
# Run it!
|
||||
batch.run
|
||||
|
||||
# Success, exit status 0
|
||||
0
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue