`vagrant provision` accepts `--provision-with` [GH-1167]
This commit is contained in:
parent
9d2f26604e
commit
d19194d95b
|
@ -33,6 +33,7 @@ FEATURES:
|
||||||
- Add a VirtualBox provider config `auto_nat_dns_proxy` which when set to
|
- Add a VirtualBox provider config `auto_nat_dns_proxy` which when set to
|
||||||
false will not attempt to automatically manage NAT DNS proxy settings
|
false will not attempt to automatically manage NAT DNS proxy settings
|
||||||
with VirtualBox. [GH-1313]
|
with VirtualBox. [GH-1313]
|
||||||
|
- `vagrant provision` accepts the `--provision-with` flag [GH-1167]
|
||||||
|
|
||||||
IMPROVEMENTS / BUG FIXES:
|
IMPROVEMENTS / BUG FIXES:
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,16 @@ module VagrantPlugins
|
||||||
module CommandProvision
|
module CommandProvision
|
||||||
class Command < Vagrant.plugin("2", :command)
|
class Command < Vagrant.plugin("2", :command)
|
||||||
def execute
|
def execute
|
||||||
|
options = {}
|
||||||
|
options[:provision_types] = nil
|
||||||
|
|
||||||
opts = OptionParser.new do |o|
|
opts = OptionParser.new do |o|
|
||||||
o.banner = "Usage: vagrant provision [vm-name]"
|
o.banner = "Usage: vagrant provision [vm-name] [--provision-with x,y,z]"
|
||||||
|
|
||||||
|
o.on("--provision-with x,y,z", Array,
|
||||||
|
"Enable only certain provisioners, by type.") do |list|
|
||||||
|
options[:provision_types] = list.map { |type| type.to_sym }
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Parse the options
|
# Parse the options
|
||||||
|
@ -15,7 +23,7 @@ module VagrantPlugins
|
||||||
# Go over each VM and provision!
|
# Go over each VM and provision!
|
||||||
@logger.debug("'provision' each target VM...")
|
@logger.debug("'provision' each target VM...")
|
||||||
with_target_vms(argv) do |machine|
|
with_target_vms(argv) do |machine|
|
||||||
machine.action(:provision)
|
machine.action(:provision, options)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Success, exit status 0
|
# Success, exit status 0
|
||||||
|
|
Loading…
Reference in New Issue