vagrant_bootstrap 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,6 +7,8 @@ module VagrantBootstrap
|
|
7
7
|
class CLI
|
8
8
|
|
9
9
|
DEFAULT_BRIDGE = 'br0'
|
10
|
+
DEFAULT_TEMPLATE_FILE = 'Vagrantfile.erb'
|
11
|
+
|
10
12
|
BANNER = <<-EOS
|
11
13
|
Easily generate a Vagrantfile in a namespaced directory
|
12
14
|
|
@@ -26,11 +28,14 @@ hostname of the VM, e.g. 'vgbs taco' will yield a directory and hostname of
|
|
26
28
|
opt :bridge, 'The bridge to attach the VM to', :default => DEFAULT_BRIDGE
|
27
29
|
opt :quiet, "Don't output anything unless there's a problem", :default => false
|
28
30
|
opt :verbose, "More verbose output", :default => false
|
31
|
+
opt :template_file, 'Specify a different template file', :type => String
|
29
32
|
end
|
30
33
|
opts = OpenStruct.new(trollopts)
|
31
34
|
|
32
|
-
#
|
35
|
+
# sanitize options
|
33
36
|
opts.name = VagrantBootstrap.vm_name(ARGV[0])
|
37
|
+
opts.template_file = DEFAULT_TEMPLATE_FILE if opts.template_file.nil?
|
38
|
+
|
34
39
|
puts "Your vagrant is called #{opts.name}" unless opts.quiet
|
35
40
|
VagrantBootstrap::Bootstrap.new opts
|
36
41
|
end
|