vagrant 0.7.8 → 0.8.1
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.
- data/CHANGELOG.md +39 -0
- data/Gemfile +1 -7
- data/Rakefile +0 -11
- data/bin/vagrant +4 -0
- data/config/default.rb +1 -2
- data/lib/vagrant.rb +7 -5
- data/lib/vagrant/action.rb +5 -1
- data/lib/vagrant/action/builtin.rb +4 -1
- data/lib/vagrant/action/general/package.rb +6 -2
- data/lib/vagrant/action/vm.rb +2 -0
- data/lib/vagrant/action/vm/clear_forwarded_ports.rb +9 -22
- data/lib/vagrant/action/vm/clear_shared_folders.rb +9 -14
- data/lib/vagrant/action/vm/customize.rb +9 -4
- data/lib/vagrant/action/vm/forward_ports.rb +10 -11
- data/lib/vagrant/action/vm/match_mac_address.rb +8 -3
- data/lib/vagrant/action/vm/modify.rb +37 -0
- data/lib/vagrant/action/vm/network.rb +9 -2
- data/lib/vagrant/action/vm/provision.rb +10 -17
- data/lib/vagrant/action/vm/provisioner_cleanup.rb +26 -0
- data/lib/vagrant/action/vm/share_folders.rb +16 -8
- data/lib/vagrant/action/warden.rb +8 -2
- data/lib/vagrant/command/ssh.rb +4 -4
- data/lib/vagrant/command/ssh_config.rb +4 -2
- data/lib/vagrant/config/ssh.rb +3 -0
- data/lib/vagrant/config/vm.rb +16 -12
- data/lib/vagrant/downloaders/http.rb +2 -0
- data/lib/vagrant/environment.rb +136 -12
- data/lib/vagrant/errors.rb +15 -0
- data/lib/vagrant/provisioners.rb +1 -1
- data/lib/vagrant/provisioners/base.rb +4 -0
- data/lib/vagrant/provisioners/chef.rb +13 -11
- data/lib/vagrant/provisioners/{chef_server.rb → chef_client.rb} +5 -5
- data/lib/vagrant/provisioners/chef_solo.rb +48 -89
- data/lib/vagrant/provisioners/shell.rb +47 -12
- data/lib/vagrant/ssh.rb +61 -27
- data/lib/vagrant/systems.rb +1 -0
- data/lib/vagrant/systems/base.rb +1 -1
- data/lib/vagrant/systems/linux.rb +7 -9
- data/lib/vagrant/systems/redhat.rb +12 -4
- data/lib/vagrant/systems/solaris.rb +9 -4
- data/lib/vagrant/systems/suse.rb +9 -0
- data/lib/vagrant/ui.rb +12 -5
- data/lib/vagrant/util.rb +2 -2
- data/lib/vagrant/util/counter.rb +22 -0
- data/lib/vagrant/util/platform.rb +1 -2
- data/lib/vagrant/util/safe_exec.rb +28 -0
- data/lib/vagrant/version.rb +1 -1
- data/lib/vagrant/vm.rb +2 -0
- data/templates/chef_solo_solo.erb +4 -4
- data/templates/commands/init/Vagrantfile.erb +4 -0
- data/templates/locales/en.yml +31 -8
- data/templates/ssh_config.erb +6 -0
- data/test/test_helper.rb +5 -3
- data/test/vagrant/action/builder_test.rb +4 -0
- data/test/vagrant/action/vm/clear_forwarded_ports_test.rb +18 -38
- data/test/vagrant/action/vm/clear_shared_folders_test.rb +7 -16
- data/test/vagrant/action/vm/customize_test.rb +12 -5
- data/test/vagrant/action/vm/forward_ports_test.rb +12 -7
- data/test/vagrant/action/vm/match_mac_address_test.rb +5 -1
- data/test/vagrant/action/vm/modify_test.rb +38 -0
- data/test/vagrant/action/vm/provision_test.rb +13 -38
- data/test/vagrant/action/vm/provisioner_cleanup_test.rb +56 -0
- data/test/vagrant/action/vm/share_folders_test.rb +10 -5
- data/test/vagrant/action/warden_test.rb +13 -7
- data/test/vagrant/config/vm_test.rb +0 -22
- data/test/vagrant/downloaders/http_test.rb +2 -0
- data/test/vagrant/environment_test.rb +110 -20
- data/test/vagrant/provisioners/{chef_server_test.rb → chef_client_test.rb} +2 -2
- data/test/vagrant/provisioners/chef_solo_test.rb +16 -173
- data/test/vagrant/ssh_test.rb +8 -43
- data/test/vagrant/systems/linux_test.rb +9 -19
- data/test/vagrant/util/counter_test.rb +29 -0
- data/test/vagrant/util/platform_test.rb +2 -2
- data/vagrant.gemspec +1 -2
- metadata +114 -84
- data/lib/vagrant/util/plain_logger.rb +0 -25
- data/lib/vagrant/util/resource_logger.rb +0 -63
- data/test/vagrant/util/plain_logger_test.rb +0 -17
- data/test/vagrant/util/resource_logger_test.rb +0 -78
data/lib/vagrant/systems.rb
CHANGED
data/lib/vagrant/systems/base.rb
CHANGED
@@ -60,7 +60,7 @@ module Vagrant
|
|
60
60
|
# @param [String] name The name of the shared folder.
|
61
61
|
# @param [String] guestpath The path on the machine which the user
|
62
62
|
# wants the folder mounted.
|
63
|
-
def mount_shared_folder(ssh, name, guestpath); end
|
63
|
+
def mount_shared_folder(ssh, name, guestpath, owner, group); end
|
64
64
|
|
65
65
|
# Mounts a shared folder via NFS. This assumes that the exports
|
66
66
|
# via the host are already done.
|
@@ -13,6 +13,7 @@ module Vagrant
|
|
13
13
|
|
14
14
|
return :gentoo if ssh.test?("cat /etc/gentoo-release")
|
15
15
|
return :redhat if ssh.test?("cat /etc/redhat-release")
|
16
|
+
return :suse if ssh.test?("cat /etc/SuSE-release")
|
16
17
|
end
|
17
18
|
|
18
19
|
# Can't detect the distro, assume vanilla linux
|
@@ -37,10 +38,10 @@ module Vagrant
|
|
37
38
|
end
|
38
39
|
end
|
39
40
|
|
40
|
-
def mount_shared_folder(ssh, name, guestpath)
|
41
|
+
def mount_shared_folder(ssh, name, guestpath, owner, group)
|
41
42
|
ssh.exec!("sudo mkdir -p #{guestpath}")
|
42
|
-
mount_folder(ssh, name, guestpath)
|
43
|
-
ssh.exec!("sudo chown #{
|
43
|
+
mount_folder(ssh, name, guestpath, owner, group)
|
44
|
+
ssh.exec!("sudo chown `id -u #{owner}`:`id -g #{group}` #{guestpath}")
|
44
45
|
end
|
45
46
|
|
46
47
|
def mount_nfs(ip, folders)
|
@@ -57,16 +58,13 @@ module Vagrant
|
|
57
58
|
#-------------------------------------------------------------------
|
58
59
|
# "Private" methods which assist above methods
|
59
60
|
#-------------------------------------------------------------------
|
60
|
-
def mount_folder(ssh, name, guestpath, sleeptime=5)
|
61
|
+
def mount_folder(ssh, name, guestpath, owner, group, sleeptime=5)
|
61
62
|
# Determine the permission string to attach to the mount command
|
62
|
-
|
63
|
-
perms << "uid=`id -u #{vm.env.config.vm.shared_folder_uid}`"
|
64
|
-
perms << "gid=`id -g #{vm.env.config.vm.shared_folder_gid}`"
|
65
|
-
perms = " -o #{perms.join(",")}" if !perms.empty?
|
63
|
+
options = "-o uid=`id -u #{owner}`,gid=`id -g #{group}`"
|
66
64
|
|
67
65
|
attempts = 0
|
68
66
|
while true
|
69
|
-
result = ssh.exec!("sudo mount -t vboxsf#{
|
67
|
+
result = ssh.exec!("sudo mount -t vboxsf #{options} #{name} #{guestpath}") do |ch, type, data|
|
70
68
|
# net/ssh returns the value in ch[:result] (based on looking at source)
|
71
69
|
ch[:result] = !!(type == :stderr && data =~ /No such device/i)
|
72
70
|
end
|
@@ -6,9 +6,9 @@ module Vagrant
|
|
6
6
|
# interface file.
|
7
7
|
vm.ssh.execute do |ssh|
|
8
8
|
# Clear out any previous entries
|
9
|
-
ssh.exec!("sudo touch /
|
10
|
-
ssh.exec!("sudo sed -e '/^#VAGRANT-BEGIN/,/^#VAGRANT-END/ d' /
|
11
|
-
ssh.exec!("sudo su -c 'cat /tmp/vagrant-ifcfg-eth#{net_options[:adapter]} > /
|
9
|
+
ssh.exec!("sudo touch #{network_scripts_dir}/ifcfg-eth#{net_options[:adapter]}")
|
10
|
+
ssh.exec!("sudo sed -e '/^#VAGRANT-BEGIN/,/^#VAGRANT-END/ d' #{network_scripts_dir}/ifcfg-eth#{net_options[:adapter]} > /tmp/vagrant-ifcfg-eth#{net_options[:adapter]}")
|
11
|
+
ssh.exec!("sudo su -c 'cat /tmp/vagrant-ifcfg-eth#{net_options[:adapter]} > #{network_scripts_dir}/ifcfg-eth#{net_options[:adapter]}'")
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
@@ -20,11 +20,19 @@ module Vagrant
|
|
20
20
|
vm.ssh.execute do |ssh|
|
21
21
|
interface_up = ssh.test?("/sbin/ifconfig eth#{net_options[:adapter]} | grep 'inet addr:'")
|
22
22
|
ssh.exec!("sudo /sbin/ifdown eth#{net_options[:adapter]} 2> /dev/null") if interface_up
|
23
|
-
ssh.exec!("sudo su -c 'cat /tmp/vagrant-network-entry >> /
|
23
|
+
ssh.exec!("sudo su -c 'cat /tmp/vagrant-network-entry >> #{network_scripts_dir}/ifcfg-eth#{net_options[:adapter]}'")
|
24
24
|
ssh.exec!("sudo /sbin/ifup eth#{net_options[:adapter]}")
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
|
+
# The path to the directory with the network configuration scripts.
|
29
|
+
# This is pulled out into its own directory since there are other
|
30
|
+
# operationg systems (SuSE) which behave similarly but with a different
|
31
|
+
# path to the network scripts.
|
32
|
+
def network_scripts_dir
|
33
|
+
'/etc/sysconfig/network-scripts/'
|
34
|
+
end
|
35
|
+
|
28
36
|
def change_host_name(name)
|
29
37
|
vm.ssh.execute do |ssh|
|
30
38
|
# Only do this if the hostname is not already set
|
@@ -51,11 +51,16 @@ module Vagrant
|
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
54
|
-
def mount_shared_folder(ssh, name, guestpath)
|
54
|
+
def mount_shared_folder(ssh, name, guestpath, owner, group)
|
55
|
+
# Create the shared folder
|
55
56
|
ssh.exec!("#{vm.env.config.solaris.suexec_cmd} mkdir -p #{guestpath}")
|
56
|
-
|
57
|
-
|
58
|
-
|
57
|
+
|
58
|
+
# Mount the folder with the proper owner/group
|
59
|
+
options = "-o uid=`id -u #{owner}`,gid=`id -g #{group}`"
|
60
|
+
ssh.exec!("#{vm.env.config.solaris.suexec_cmd} /sbin/mount -F vboxfs #{options} #{name} #{guestpath}")
|
61
|
+
|
62
|
+
# chown the folder to the proper owner/group
|
63
|
+
ssh.exec!("#{vm.env.config.solaris.suexec_cmd} chown `id -u #{owner}`:`id -g #{group}` #{guestpath}")
|
59
64
|
end
|
60
65
|
end
|
61
66
|
end
|
data/lib/vagrant/ui.rb
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
require 'mario'
|
2
|
-
|
3
1
|
module Vagrant
|
4
2
|
# Vagrant UIs handle communication with the outside world (typically
|
5
3
|
# through a shell). They must respond to the typically logger methods
|
@@ -11,8 +9,15 @@ module Vagrant
|
|
11
9
|
@env = env
|
12
10
|
end
|
13
11
|
|
14
|
-
[:warn, :error, :info, :confirm
|
15
|
-
|
12
|
+
[:warn, :error, :info, :confirm].each do |method|
|
13
|
+
define_method(method) do |message|
|
14
|
+
# Log normal console messages
|
15
|
+
env.logger.info("ui") { message }
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
[:report_progress, :ask, :no?, :yes?].each do |method|
|
20
|
+
# By default do nothing, these aren't logged
|
16
21
|
define_method(method) { |*args| }
|
17
22
|
end
|
18
23
|
|
@@ -28,6 +33,7 @@ module Vagrant
|
|
28
33
|
[[:warn, :yellow], [:error, :red], [:info, nil], [:confirm, :green]].each do |method, color|
|
29
34
|
class_eval <<-CODE
|
30
35
|
def #{method}(message, opts=nil)
|
36
|
+
super(message)
|
31
37
|
@shell.say("\#{line_reset}\#{format_message(message, opts)}", #{color.inspect})
|
32
38
|
end
|
33
39
|
CODE
|
@@ -36,6 +42,7 @@ module Vagrant
|
|
36
42
|
[:ask, :no?, :yes?].each do |method|
|
37
43
|
class_eval <<-CODE
|
38
44
|
def #{method}(message, opts=nil)
|
45
|
+
super(message)
|
39
46
|
opts ||= {}
|
40
47
|
@shell.send(#{method.inspect}, format_message(message, opts), opts[:color])
|
41
48
|
end
|
@@ -61,7 +68,7 @@ module Vagrant
|
|
61
68
|
|
62
69
|
def line_reset
|
63
70
|
reset = "\r"
|
64
|
-
reset += "\e[0K" unless
|
71
|
+
reset += "\e[0K" unless Util::Platform.windows?
|
65
72
|
reset
|
66
73
|
end
|
67
74
|
end
|
data/lib/vagrant/util.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
module Vagrant
|
2
2
|
module Util
|
3
3
|
autoload :Busy, 'vagrant/util/busy'
|
4
|
+
autoload :Counter, 'vagrant/util/counter'
|
4
5
|
autoload :GlobLoader, 'vagrant/util/glob_loader'
|
5
6
|
autoload :HashWithIndifferentAccess, 'vagrant/util/hash_with_indifferent_access'
|
6
|
-
autoload :PlainLogger, 'vagrant/util/plain_logger'
|
7
7
|
autoload :Platform, 'vagrant/util/platform'
|
8
|
-
autoload :ResourceLogger, 'vagrant/util/resource_logger'
|
9
8
|
autoload :Retryable, 'vagrant/util/retryable'
|
9
|
+
autoload :SafeExec, 'vagrant/util/safe_exec'
|
10
10
|
autoload :StackedProcRunner, 'vagrant/util/stacked_proc_runner'
|
11
11
|
autoload :TemplateRenderer, 'vagrant/util/template_renderer'
|
12
12
|
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'thread'
|
2
|
+
|
3
|
+
module Vagrant
|
4
|
+
module Util
|
5
|
+
# Atomic counter implementation. This is useful for incrementing
|
6
|
+
# a counter which is guaranteed to only be used once in its class.
|
7
|
+
module Counter
|
8
|
+
def get_and_update_counter
|
9
|
+
mutex.synchronize do
|
10
|
+
@__counter ||= 1
|
11
|
+
result = @__counter
|
12
|
+
@__counter += 1
|
13
|
+
result
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def mutex
|
18
|
+
@__counter_mutex ||= Mutex.new
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'rbconfig'
|
2
|
-
require 'mario'
|
3
2
|
|
4
3
|
module Vagrant
|
5
4
|
module Util
|
@@ -53,7 +52,7 @@ module Vagrant
|
|
53
52
|
|
54
53
|
def tar_file_options
|
55
54
|
# create, write only, fail if the file exists, binary if windows
|
56
|
-
File::WRONLY|File::EXCL|File::CREAT|(
|
55
|
+
File::WRONLY | File::EXCL | File::CREAT | (windows? ? File::BINARY : 0)
|
57
56
|
end
|
58
57
|
|
59
58
|
def platform
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Vagrant
|
2
|
+
module Util
|
3
|
+
# This module provies a `safe_exec` method which is a drop-in
|
4
|
+
# replacement for `Kernel.exec` which addresses a specific issue
|
5
|
+
# which manifests on OS X 10.5 and perhaps other operating systems.
|
6
|
+
# This issue causes `exec` to fail if there is more than one system
|
7
|
+
# thread. In that case, `safe_exec` automatically falls back to
|
8
|
+
# forking.
|
9
|
+
module SafeExec
|
10
|
+
def safe_exec(command)
|
11
|
+
fork_instead = false
|
12
|
+
begin
|
13
|
+
pid = nil
|
14
|
+
pid = fork if fork_instead
|
15
|
+
Kernel.exec(command) if pid.nil?
|
16
|
+
Process.wait(pid) if pid
|
17
|
+
rescue Errno::E045
|
18
|
+
# We retried already, raise the issue and be done
|
19
|
+
raise if fork_instead
|
20
|
+
|
21
|
+
# The error manifested itself, retry with a fork.
|
22
|
+
fork_instead = true
|
23
|
+
retry
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
data/lib/vagrant/version.rb
CHANGED
data/lib/vagrant/vm.rb
CHANGED
@@ -51,6 +51,7 @@ module Vagrant
|
|
51
51
|
# **This method should never be called manually.**
|
52
52
|
def load_system!(system=nil)
|
53
53
|
system ||= env.config.vm.system
|
54
|
+
env.logger.info("vm: #{name}") { "Loading system: #{system}" }
|
54
55
|
|
55
56
|
if system.is_a?(Class)
|
56
57
|
raise Errors::VMSystemError, :_key => :invalid_class, :system => system.to_s if !(system <= Systems::Base)
|
@@ -63,6 +64,7 @@ module Vagrant
|
|
63
64
|
:freebsd => Systems::FreeBSD,
|
64
65
|
:gentoo => Systems::Gentoo,
|
65
66
|
:redhat => Systems::Redhat,
|
67
|
+
:suse => Systems::Suse,
|
66
68
|
:linux => Systems::Linux,
|
67
69
|
:solaris => Systems::Solaris
|
68
70
|
}
|
@@ -2,12 +2,12 @@
|
|
2
2
|
node_name "<%= node_name %>"
|
3
3
|
<% end %>
|
4
4
|
file_cache_path "<%= provisioning_path %>"
|
5
|
-
cookbook_path <%= cookbooks_path %>
|
6
|
-
role_path <%= roles_path %>
|
5
|
+
cookbook_path <%= cookbooks_path.inspect %>
|
6
|
+
role_path <%= roles_path.inspect %>
|
7
7
|
log_level <%= log_level.inspect %>
|
8
8
|
|
9
|
-
<% if data_bags_path
|
10
|
-
data_bag_path <%= data_bags_path %>
|
9
|
+
<% if data_bags_path -%>
|
10
|
+
data_bag_path <%= data_bags_path.inspect %>
|
11
11
|
<% end %>
|
12
12
|
|
13
13
|
<% if recipe_url -%>
|
@@ -33,6 +33,10 @@ Vagrant::Config.run do |config|
|
|
33
33
|
#
|
34
34
|
# An example Puppet manifest to provision the message of the day:
|
35
35
|
#
|
36
|
+
# # group { "puppet":
|
37
|
+
# # ensure => "present",
|
38
|
+
# # }
|
39
|
+
# #
|
36
40
|
# # File { owner => 0, group => 0, mode => 0644 }
|
37
41
|
# #
|
38
42
|
# # file { '/etc/motd':
|
data/templates/locales/en.yml
CHANGED
@@ -2,6 +2,14 @@ en:
|
|
2
2
|
vagrant:
|
3
3
|
general:
|
4
4
|
creating_home_dir: "Creating home directory since it doesn't exist: %{directory}"
|
5
|
+
moving_home_dir: "Moving old Vagrant home directory to new location: %{directory}"
|
6
|
+
home_dir_migration_failed: |-
|
7
|
+
Both an old and new Vagrant home directory exist. Only the new one will
|
8
|
+
be used. Please merge the old directory into the new directory if you'd
|
9
|
+
like to use the old data as well.
|
10
|
+
|
11
|
+
Old: %{old}
|
12
|
+
New: %{new}
|
5
13
|
|
6
14
|
#-------------------------------------------------------------------------------
|
7
15
|
# Translations for exception classes
|
@@ -31,6 +39,11 @@ en:
|
|
31
39
|
this command in another directory. If you aren't in a home directory,
|
32
40
|
then please rename ".vagrant" to something else, or configure Vagrant
|
33
41
|
to use another filename by modifying `config.vagrant.dotfile_name`.
|
42
|
+
environment_locked: |-
|
43
|
+
An instance of Vagrant is already running. Only one instance of Vagrant
|
44
|
+
may run at any given time to avoid problems with VirtualBox inconsistencies
|
45
|
+
occurring. Please wait for the other instance of Vagrant to end and then
|
46
|
+
try again.
|
34
47
|
interrupted: "Vagrant exited after cleanup due to external interrupt."
|
35
48
|
multi_vm_required: "A multi-vm environment is required for name specification to this command."
|
36
49
|
multi_vm_target_required: "`vagrant %{command}` requires a specific VM name to target in a multi-VM environment."
|
@@ -127,13 +140,15 @@ en:
|
|
127
140
|
%{file}
|
128
141
|
virtualbox_invalid_version: |-
|
129
142
|
Vagrant has detected that you have VirtualBox version %{version} installed!
|
130
|
-
Vagrant requires that you use at least VirtualBox version 4.
|
143
|
+
Vagrant requires that you use at least VirtualBox version 4.1. Please install
|
131
144
|
a more recent version of VirtualBox to continue.
|
132
145
|
|
133
|
-
|
134
|
-
|
146
|
+
Early versions of Vagrant support earlier versions of VirtualBox. Specifically,
|
147
|
+
the 0.7.x series supports VirtualBox 4.0.x and the 0.6.x series supports VirtualBox
|
148
|
+
3.2.x. Please use the version you need.
|
135
149
|
|
136
|
-
Any
|
150
|
+
Any newer versions may not be supported yet. Please check the mailing list
|
151
|
+
for any announcements of newer versions.
|
137
152
|
virtualbox_not_detected: |-
|
138
153
|
Vagrant could not detect VirtualBox! Make sure VirtualBox is properly installed.
|
139
154
|
If VirtualBox is installed, it may be an incorrect version. Vagrant currently
|
@@ -176,6 +191,9 @@ en:
|
|
176
191
|
box_missing: "A box must be specified."
|
177
192
|
box_not_found: "The box '%{name}' could not be found."
|
178
193
|
shared_folder_hostpath_missing: "Shared folder host path for '%{name}' doesn't exist: %{path}"
|
194
|
+
shared_folder_nfs_owner_group: |-
|
195
|
+
Shared folder '%{name}': NFS does not support the owner/group settings.
|
196
|
+
provisioner_chef_server_changed: "The provisioner 'chef_server' is now 'chef_client'"
|
179
197
|
provisioner_not_found: "The provisioner '%{shortcut}' doesn't exist."
|
180
198
|
provisioner_invalid_class: "The provisioner '%{shortcut}' must inherit from `Vagrant::Provisioners::Base`."
|
181
199
|
|
@@ -188,7 +206,7 @@ en:
|
|
188
206
|
box:
|
189
207
|
no_installed_boxes: "There are no installed boxes! Use `vagrant box add` to add some."
|
190
208
|
ssh:
|
191
|
-
|
209
|
+
command: "Command: %{command}"
|
192
210
|
status:
|
193
211
|
aborted: |-
|
194
212
|
The VM is in an aborted state. This means that it was abruptly
|
@@ -395,7 +413,6 @@ en:
|
|
395
413
|
persisting: "Persisting the VM UUID (%{uuid})..."
|
396
414
|
provision:
|
397
415
|
beginning: "Running provisioner: %{provisioner}..."
|
398
|
-
enabled: "Provisioning enabled with %{provisioner}..."
|
399
416
|
resume:
|
400
417
|
resuming: Resuming suspended VM...
|
401
418
|
share_folders:
|
@@ -450,6 +467,11 @@ en:
|
|
450
467
|
An error occurred while trying to download the specified box. This most
|
451
468
|
often happens if there is no internet connection or the address is
|
452
469
|
invalid.
|
470
|
+
status_error: |-
|
471
|
+
Bad status code: %{status}
|
472
|
+
|
473
|
+
Please verify that the box exists and is accessible. Also verify that
|
474
|
+
this computer is properly connected to the internet.
|
453
475
|
|
454
476
|
hosts:
|
455
477
|
bsd:
|
@@ -471,7 +493,7 @@ en:
|
|
471
493
|
upload_encrypted_data_bag_secret_key: "Uploading chef encrypted data bag secret key..."
|
472
494
|
running_client: "Running chef-client..."
|
473
495
|
running_solo: "Running chef-solo..."
|
474
|
-
invalid_provisioner: "Vagrant::Provisioners::Chef is not a valid provisioner! Use ChefSolo or
|
496
|
+
invalid_provisioner: "Vagrant::Provisioners::Chef is not a valid provisioner! Use ChefSolo or ChefClient instead."
|
475
497
|
not_detected: |-
|
476
498
|
The `%{binary}` binary appears to not be in the PATH of the guest. This
|
477
499
|
could be because the PATH is not properly setup or perhaps chef is not
|
@@ -509,7 +531,8 @@ en:
|
|
509
531
|
running_puppetd: "Running Puppet agent..."
|
510
532
|
|
511
533
|
shell:
|
512
|
-
|
534
|
+
path_and_inline_set: "Only one of `path` or `inline` may be set."
|
535
|
+
no_path_or_inline: "One of `path` or `inline` must be set."
|
513
536
|
path_invalid: "`path` for shell provisioner does not exist on the host system: %{path}"
|
514
537
|
upload_path_not_set: "`upload_path` must be set for the shell provisioner."
|
515
538
|
|
data/templates/ssh_config.erb
CHANGED
data/test/test_helper.rb
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
$:.unshift(File.dirname(__FILE__))
|
3
3
|
|
4
4
|
require 'vagrant'
|
5
|
-
require 'mario'
|
6
5
|
require 'contest'
|
7
6
|
require 'mocha'
|
8
7
|
|
@@ -14,8 +13,11 @@ begin
|
|
14
13
|
rescue LoadError
|
15
14
|
end
|
16
15
|
|
17
|
-
#
|
18
|
-
|
16
|
+
# Set the home directory to some temporary directory
|
17
|
+
ENV["HOME"] = Vagrant.source_root.join("test", "tmp", "home").to_s
|
18
|
+
|
19
|
+
# Set the log output to nothing
|
20
|
+
ENV["VAGRANT_LOG"] = "NULL"
|
19
21
|
|
20
22
|
# Add the I18n locale for tests
|
21
23
|
I18n.load_path << File.expand_path("../locales/en.yml", __FILE__)
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require "test_helper"
|
2
|
+
require "logger"
|
2
3
|
|
3
4
|
class ActionBuilderTest < Test::Unit::TestCase
|
4
5
|
setup do
|
@@ -64,6 +65,7 @@ class ActionBuilderTest < Test::Unit::TestCase
|
|
64
65
|
context "flatten" do
|
65
66
|
should "return the flattened format of the builder" do
|
66
67
|
env = Vagrant::Action::Environment.new(nil)
|
68
|
+
env["logger"] = Logger.new(nil)
|
67
69
|
env.expects(:foo).once
|
68
70
|
|
69
71
|
func = lambda { |x| x.foo }
|
@@ -157,6 +159,7 @@ class ActionBuilderTest < Test::Unit::TestCase
|
|
157
159
|
context "converting to an app" do
|
158
160
|
should "make non-classes lambdas" do
|
159
161
|
env = Vagrant::Action::Environment.new(nil)
|
162
|
+
env["logger"] = Logger.new(nil)
|
160
163
|
env.expects(:foo).once
|
161
164
|
|
162
165
|
func = lambda { |x| x.foo }
|
@@ -193,6 +196,7 @@ class ActionBuilderTest < Test::Unit::TestCase
|
|
193
196
|
end
|
194
197
|
|
195
198
|
env = Vagrant::Action::Environment.new(nil)
|
199
|
+
env["logger"] = Logger.new(nil)
|
196
200
|
env[:key] = :value
|
197
201
|
|
198
202
|
@instance.use(mw)
|