vagrant 0.8.2 → 0.8.5
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 +16 -0
- data/Gemfile +0 -2
- data/lib/vagrant/action/vm/check_guest_additions.rb +9 -4
- data/lib/vagrant/action/vm/import.rb +5 -0
- data/lib/vagrant/command/provision.rb +6 -2
- data/lib/vagrant/command/ssh.rb +5 -2
- data/lib/vagrant/config/ssh.rb +2 -2
- data/lib/vagrant/provisioners/chef.rb +20 -8
- data/lib/vagrant/provisioners/chef_client.rb +1 -1
- data/lib/vagrant/provisioners/chef_solo.rb +17 -6
- data/lib/vagrant/ssh/session.rb +17 -6
- data/lib/vagrant/systems.rb +1 -0
- data/lib/vagrant/systems/arch.rb +34 -0
- data/lib/vagrant/systems/linux.rb +1 -0
- data/lib/vagrant/systems/redhat.rb +1 -1
- data/lib/vagrant/ui.rb +8 -3
- data/lib/vagrant/util/counter.rb +6 -4
- data/lib/vagrant/util/safe_exec.rb +8 -1
- data/lib/vagrant/version.rb +1 -1
- data/lib/vagrant/vm.rb +2 -1
- data/templates/commands/init/Vagrantfile.erb +2 -2
- data/templates/locales/en.yml +2 -3
- data/templates/network_entry_arch.erb +9 -0
- data/test/vagrant/provisioners/chef_solo_test.rb +2 -2
- data/test/vagrant/provisioners/chef_test.rb +11 -0
- metadata +48 -19
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
## 0.8.4 (August 15, 2011)
|
2
|
+
|
3
|
+
Note: 0.8.3 was yanked due to RubyGems encoding issue.
|
4
|
+
|
5
|
+
- Fix SSH `exec!` to inherit proper `$PATH`. [GH-426]
|
6
|
+
- Chef client now accepts an empty (`nil`) run list again. [GH-429]
|
7
|
+
- Fix incorrect error message when running `provision` on halted VM. [GH-447]
|
8
|
+
- Checking guest addition versions now ignores OSE. [GH-438]
|
9
|
+
- Chef solo from a remote URL fixed. [GH-431]
|
10
|
+
- Arch linux support: host only networks and changing the host name. [GH-439] [GH-448]
|
11
|
+
- Chef solo `roles_path` and `data_bags_path` can only be be single paths. [GH-446]
|
12
|
+
- Fix `virtualbox_not_detected` error message to require 4.1.x. [GH-458]
|
13
|
+
- Add shortname (`hostname -s`) for hostname setting on RHEL systems. [GH-456]
|
14
|
+
- `vagrant ssh -c` output no longer has a prefix and respects newlines
|
15
|
+
from the output. [GH-462]
|
16
|
+
|
1
17
|
## 0.8.2 (July 22, 2011)
|
2
18
|
|
3
19
|
- Fix issue with SSH disconnects not reconnecting.
|
data/Gemfile
CHANGED
@@ -6,8 +6,6 @@ gem "vagrant", :path => '.'
|
|
6
6
|
# typically coincides with it
|
7
7
|
gem "virtualbox", :git => "git://github.com/mitchellh/virtualbox.git"
|
8
8
|
|
9
|
-
# Gems required for testing only. To install run
|
10
|
-
# gem bundle test
|
11
9
|
group :test do
|
12
10
|
gem "rake"
|
13
11
|
gem "contest", ">= 0.1.2"
|
@@ -15,10 +15,15 @@ module Vagrant
|
|
15
15
|
version = env["vm"].vm.interface.get_guest_property_value("/VirtualBox/GuestAdd/Version")
|
16
16
|
if version.empty?
|
17
17
|
env.ui.warn I18n.t("vagrant.actions.vm.check_guest_additions.not_detected")
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
18
|
+
else
|
19
|
+
# Strip the -OSE/_OSE off from the guest additions
|
20
|
+
version = version.gsub(/[-_]ose/i, '')
|
21
|
+
|
22
|
+
if version != VirtualBox.version
|
23
|
+
env.ui.warn(I18n.t("vagrant.actions.vm.check_guest_additions.version_mismatch",
|
24
|
+
:guest_version => version,
|
25
|
+
:virtualbox_version => VirtualBox.version))
|
26
|
+
end
|
22
27
|
end
|
23
28
|
|
24
29
|
# Continue
|
@@ -11,9 +11,14 @@ module Vagrant
|
|
11
11
|
|
12
12
|
# Import the virtual machine
|
13
13
|
env.env.vm.vm = VirtualBox::VM.import(env.env.box.ovf_file.to_s) do |progress|
|
14
|
+
env.ui.clear_line
|
14
15
|
env.ui.report_progress(progress.percent, 100, false)
|
15
16
|
end
|
16
17
|
|
18
|
+
# Clear the line one last time since the progress meter doesn't disappear
|
19
|
+
# immediately.
|
20
|
+
env.ui.clear_line
|
21
|
+
|
17
22
|
# Flag as erroneous and return if import failed
|
18
23
|
raise Errors::VMImportFailure if !env["vm"].vm
|
19
24
|
|
@@ -5,8 +5,12 @@ module Vagrant
|
|
5
5
|
|
6
6
|
def execute
|
7
7
|
target_vms.each do |vm|
|
8
|
-
if vm.created?
|
9
|
-
vm.
|
8
|
+
if vm.created?
|
9
|
+
if vm.vm.running?
|
10
|
+
vm.provision
|
11
|
+
else
|
12
|
+
vm.env.ui.info I18n.t("vagrant.commands.common.vm_not_running")
|
13
|
+
end
|
10
14
|
else
|
11
15
|
vm.env.ui.info I18n.t("vagrant.commands.common.vm_not_created")
|
12
16
|
end
|
data/lib/vagrant/command/ssh.rb
CHANGED
@@ -16,9 +16,12 @@ module Vagrant
|
|
16
16
|
|
17
17
|
def ssh_execute
|
18
18
|
ssh_vm.ssh.execute do |ssh|
|
19
|
-
ssh_vm.env.ui.info I18n.t("vagrant.commands.ssh.command", :command => options[:command])
|
20
19
|
ssh.exec!(options[:command]) do |channel, type, data|
|
21
|
-
|
20
|
+
if type != :exit_status
|
21
|
+
# Print the SSH output as it comes in, but don't prefix it and don't
|
22
|
+
# force a new line so that the output is properly preserved
|
23
|
+
ssh_vm.env.ui.info(data.to_s, :prefix => false, :new_line => false)
|
24
|
+
end
|
22
25
|
end
|
23
26
|
end
|
24
27
|
end
|
data/lib/vagrant/config/ssh.rb
CHANGED
@@ -12,11 +12,11 @@ module Vagrant
|
|
12
12
|
attr_writer :private_key_path
|
13
13
|
attr_accessor :forward_agent
|
14
14
|
attr_accessor :forward_x11
|
15
|
-
attr_accessor :
|
15
|
+
attr_accessor :shell
|
16
16
|
attr_accessor :port
|
17
17
|
|
18
18
|
def initialize
|
19
|
-
@
|
19
|
+
@shell = "bash"
|
20
20
|
@port = nil
|
21
21
|
@forward_agent = false
|
22
22
|
@forward_x11 = false
|
@@ -4,6 +4,14 @@ module Vagrant
|
|
4
4
|
# chef-solo and chef-client provisioning are stored. This is **not an actual
|
5
5
|
# provisioner**. Instead, {ChefSolo} or {ChefServer} should be used.
|
6
6
|
class Chef < Base
|
7
|
+
include Util::Counter
|
8
|
+
|
9
|
+
def initialize(env, config)
|
10
|
+
super
|
11
|
+
|
12
|
+
config.provisioning_path ||= "/tmp/vagrant-chef-#{get_and_update_counter(:provisioning_path)}"
|
13
|
+
end
|
14
|
+
|
7
15
|
def prepare
|
8
16
|
raise ChefError, :invalid_provisioner
|
9
17
|
end
|
@@ -76,8 +84,6 @@ module Vagrant
|
|
76
84
|
class Chef < Base
|
77
85
|
# This is the configuration which is available through `config.chef`
|
78
86
|
class Config < Vagrant::Config::Base
|
79
|
-
extend Util::Counter
|
80
|
-
|
81
87
|
# Shared config
|
82
88
|
attr_accessor :node_name
|
83
89
|
attr_accessor :provisioning_path
|
@@ -92,10 +98,10 @@ module Vagrant
|
|
92
98
|
attr_accessor :no_proxy
|
93
99
|
attr_accessor :binary_path
|
94
100
|
attr_accessor :binary_env
|
95
|
-
|
101
|
+
attr_writer :run_list
|
96
102
|
|
97
103
|
def initialize
|
98
|
-
@provisioning_path =
|
104
|
+
@provisioning_path = nil
|
99
105
|
@log_level = :info
|
100
106
|
@json = {}
|
101
107
|
@http_proxy = nil
|
@@ -107,15 +113,21 @@ module Vagrant
|
|
107
113
|
@no_proxy = nil
|
108
114
|
@binary_path = nil
|
109
115
|
@binary_env = nil
|
110
|
-
@run_list =
|
116
|
+
@run_list = nil
|
111
117
|
end
|
112
118
|
|
113
119
|
# This returns the json that is merged with the defaults and the
|
114
120
|
# user set data.
|
115
121
|
def merged_json
|
116
|
-
{ :instance_role => "vagrant"
|
117
|
-
|
118
|
-
|
122
|
+
original = { :instance_role => "vagrant" }
|
123
|
+
original[:run_list] = @run_list if @run_list
|
124
|
+
original.merge(json || {})
|
125
|
+
end
|
126
|
+
|
127
|
+
# Returns the run list, but also sets it up to be empty if it
|
128
|
+
# hasn't been defined already.
|
129
|
+
def run_list
|
130
|
+
@run_list ||= []
|
119
131
|
end
|
120
132
|
|
121
133
|
# Adds a recipe to the run list
|
@@ -34,7 +34,7 @@ module Vagrant
|
|
34
34
|
|
35
35
|
errors.add(I18n.t("vagrant.config.chef.server_url_empty")) if !chef_server_url || chef_server_url.strip == ""
|
36
36
|
errors.add(I18n.t("vagrant.config.chef.validation_key_path")) if !validation_key_path
|
37
|
-
errors.add(I18n.t("vagrant.config.chef.run_list_empty")) if run_list && run_list.empty?
|
37
|
+
errors.add(I18n.t("vagrant.config.chef.run_list_empty")) if @run_list && @run_list.empty?
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
@@ -5,6 +5,7 @@ module Vagrant
|
|
5
5
|
register :chef_solo
|
6
6
|
|
7
7
|
extend Util::Counter
|
8
|
+
include Util::Counter
|
8
9
|
|
9
10
|
class Config < Chef::Config
|
10
11
|
attr_accessor :cookbooks_path
|
@@ -17,8 +18,8 @@ module Vagrant
|
|
17
18
|
super
|
18
19
|
|
19
20
|
@cookbooks_path = ["cookbooks", [:vm, "cookbooks"]]
|
20
|
-
@roles_path =
|
21
|
-
@data_bags_path =
|
21
|
+
@roles_path = nil
|
22
|
+
@data_bags_path = nil
|
22
23
|
@nfs = false
|
23
24
|
end
|
24
25
|
|
@@ -54,6 +55,8 @@ module Vagrant
|
|
54
55
|
|
55
56
|
# Converts paths to a list of properly expanded paths with types.
|
56
57
|
def expanded_folders(paths)
|
58
|
+
return [] if paths.nil?
|
59
|
+
|
57
60
|
# Convert the path to an array if it is a string or just a single
|
58
61
|
# path element which contains the folder location (:host or :vm)
|
59
62
|
paths = [paths] if paths.is_a?(String) || paths.first.is_a?(Symbol)
|
@@ -66,7 +69,15 @@ module Vagrant
|
|
66
69
|
# or VM path.
|
67
70
|
local_path = nil
|
68
71
|
local_path = File.expand_path(path, env.root_path) if type == :host
|
69
|
-
remote_path =
|
72
|
+
remote_path = nil
|
73
|
+
if type == :host
|
74
|
+
# Path exists on the host, setup the remote path
|
75
|
+
remote_path = "#{config.provisioning_path}/chef-solo-#{get_and_update_counter(:cookbooks_path)}"
|
76
|
+
else
|
77
|
+
# Path already exists on the virtual machine. Expand it
|
78
|
+
# relative to where we're provisioning.
|
79
|
+
remote_path = File.expand_path(path, config.provisioning_path)
|
80
|
+
end
|
70
81
|
|
71
82
|
# Return the result
|
72
83
|
[type, local_path, remote_path]
|
@@ -78,7 +89,7 @@ module Vagrant
|
|
78
89
|
def share_folders(prefix, folders)
|
79
90
|
folders.each do |type, local_path, remote_path|
|
80
91
|
if type == :host
|
81
|
-
env.config.vm.share_folder("v-#{prefix}-#{self.class.get_and_update_counter}",
|
92
|
+
env.config.vm.share_folder("v-#{prefix}-#{self.class.get_and_update_counter(:shared_folder)}",
|
82
93
|
remote_path, local_path, :nfs => config.nfs)
|
83
94
|
end
|
84
95
|
end
|
@@ -86,8 +97,8 @@ module Vagrant
|
|
86
97
|
|
87
98
|
def setup_solo_config
|
88
99
|
cookbooks_path = guest_paths(@cookbook_folders)
|
89
|
-
roles_path = guest_paths(@role_folders)
|
90
|
-
data_bags_path = guest_paths(@data_bags_folders)
|
100
|
+
roles_path = guest_paths(@role_folders).first
|
101
|
+
data_bags_path = guest_paths(@data_bags_folders).first
|
91
102
|
|
92
103
|
setup_config("chef_solo_solo", "solo.rb", {
|
93
104
|
:node_name => config.node_name,
|
data/lib/vagrant/ssh/session.rb
CHANGED
@@ -34,7 +34,7 @@ module Vagrant
|
|
34
34
|
# of `sudo`.
|
35
35
|
def sudo!(commands, options=nil, &block)
|
36
36
|
channel = session.open_channel do |ch|
|
37
|
-
ch.exec("sudo -H #{env.config.ssh.
|
37
|
+
ch.exec("sudo -H #{env.config.ssh.shell} -l") do |ch2, success|
|
38
38
|
# Set the terminal
|
39
39
|
ch2.send_data "export TERM=vt100\n"
|
40
40
|
|
@@ -60,12 +60,23 @@ module Vagrant
|
|
60
60
|
# the command completes. This is an almost line for line copy of
|
61
61
|
# the actual `exec!` implementation, except that this
|
62
62
|
# implementation also reports `:exit_status` to the block if given.
|
63
|
-
def exec!(
|
63
|
+
def exec!(commands, options=nil, &block)
|
64
64
|
retryable(:tries => 5, :on => [IOError, Net::SSH::Disconnect], :sleep => 1.0) do
|
65
|
-
metach = session.open_channel do |
|
66
|
-
|
67
|
-
|
68
|
-
|
65
|
+
metach = session.open_channel do |ch|
|
66
|
+
ch.exec("#{env.config.ssh.shell} -l") do |ch2, success|
|
67
|
+
# Set the terminal
|
68
|
+
ch2.send_data "export TERM=vt100\n"
|
69
|
+
|
70
|
+
# Output the commands as if they were entered on the command line
|
71
|
+
[commands].flatten.each do |command|
|
72
|
+
ch2.send_data "#{command}\n"
|
73
|
+
end
|
74
|
+
|
75
|
+
# Remember to exit
|
76
|
+
ch2.send_data "exit\n"
|
77
|
+
|
78
|
+
# Setup the callbacks
|
79
|
+
setup_channel_callbacks(ch2, commands, options, block)
|
69
80
|
end
|
70
81
|
end
|
71
82
|
|
data/lib/vagrant/systems.rb
CHANGED
@@ -0,0 +1,34 @@
|
|
1
|
+
module Vagrant
|
2
|
+
module Systems
|
3
|
+
class Arch < Linux
|
4
|
+
def change_host_name(name)
|
5
|
+
vm.ssh.execute do |ssh|
|
6
|
+
# Only do this if the hostname is not already set
|
7
|
+
if !ssh.test?("sudo hostname | grep '#{name}'")
|
8
|
+
ssh.exec!("sudo sed -i 's/\\(HOSTNAME=\\).*/\\1#{name}/' /etc/rc.conf")
|
9
|
+
ssh.exec!("sudo hostname #{name}")
|
10
|
+
ssh.exec!("sudo sed -i 's@^\\(127[.]0[.]0[.]1[[:space:]]\\+\\)@\\1#{name} @' /etc/hosts")
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def prepare_host_only_network(net_options=nil)
|
16
|
+
vm.ssh.execute do |ssh|
|
17
|
+
ssh.exec!("sudo sed -e '/^#VAGRANT-BEGIN/,/^#VAGRANT-END/ d' /etc/rc.conf > /tmp/vagrant-network-interfaces")
|
18
|
+
ssh.exec!("sudo su -c 'cat /tmp/vagrant-network-interfaces > /etc/rc.conf'")
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def enable_host_only_network(net_options)
|
23
|
+
entry = TemplateRenderer.render('network_entry_arch', :net_options => net_options)
|
24
|
+
vm.ssh.upload!(StringIO.new(entry), "/tmp/vagrant-network-entry")
|
25
|
+
|
26
|
+
vm.ssh.execute do |ssh|
|
27
|
+
ssh.exec!("sudo su -c 'cat /tmp/vagrant-network-entry >> /etc/rc.conf'")
|
28
|
+
ssh.exec!("sudo /etc/rc.d/network restart")
|
29
|
+
ssh.exec!("sudo su -c 'dhcpcd -k eth0 && dhcpcd eth0 & sleep 3'")
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -14,6 +14,7 @@ module Vagrant
|
|
14
14
|
return :gentoo if ssh.test?("cat /etc/gentoo-release")
|
15
15
|
return :redhat if ssh.test?("cat /etc/redhat-release")
|
16
16
|
return :suse if ssh.test?("cat /etc/SuSE-release")
|
17
|
+
return :arch if ssh.test?("cat /etc/arch-release")
|
17
18
|
end
|
18
19
|
|
19
20
|
# Can't detect the distro, assume vanilla linux
|
@@ -39,7 +39,7 @@ module Vagrant
|
|
39
39
|
if !ssh.test?("sudo hostname | grep '#{name}'")
|
40
40
|
ssh.exec!("sudo sed -i 's/\\(HOSTNAME=\\).*/\\1#{name}/' /etc/sysconfig/network")
|
41
41
|
ssh.exec!("sudo hostname #{name}")
|
42
|
-
ssh.exec!("sudo sed -i 's@^\\(127[.]0[.]0[.]1[[:space:]]\\+\\)@\\1#{name} @' /etc/hosts")
|
42
|
+
ssh.exec!("sudo sed -i 's@^\\(127[.]0[.]0[.]1[[:space:]]\\+\\)@\\1#{name} #{name.split('.')[0]} @' /etc/hosts")
|
43
43
|
end
|
44
44
|
end
|
45
45
|
end
|
data/lib/vagrant/ui.rb
CHANGED
@@ -16,7 +16,7 @@ module Vagrant
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
-
[:report_progress, :ask, :no?, :yes?].each do |method|
|
19
|
+
[:clear_line, :report_progress, :ask, :no?, :yes?].each do |method|
|
20
20
|
# By default do nothing, these aren't logged
|
21
21
|
define_method(method) { |*args| }
|
22
22
|
end
|
@@ -34,7 +34,9 @@ module Vagrant
|
|
34
34
|
class_eval <<-CODE
|
35
35
|
def #{method}(message, opts=nil)
|
36
36
|
super(message)
|
37
|
-
|
37
|
+
opts ||= {}
|
38
|
+
opts[:new_line] = true if !opts.has_key?(:new_line)
|
39
|
+
@shell.say("\#{format_message(message, opts)}", #{color.inspect}, opts[:new_line])
|
38
40
|
end
|
39
41
|
CODE
|
40
42
|
end
|
@@ -53,11 +55,14 @@ module Vagrant
|
|
53
55
|
percent = (progress.to_f / total.to_f) * 100
|
54
56
|
line = "Progress: #{percent.to_i}%"
|
55
57
|
line << " (#{progress} / #{total})" if show_parts
|
56
|
-
line = "#{line_reset}#{line}"
|
57
58
|
|
58
59
|
@shell.say(line, nil, false)
|
59
60
|
end
|
60
61
|
|
62
|
+
def clear_line
|
63
|
+
@shell.say(line_reset, nil, false)
|
64
|
+
end
|
65
|
+
|
61
66
|
protected
|
62
67
|
|
63
68
|
def format_message(message, opts=nil)
|
data/lib/vagrant/util/counter.rb
CHANGED
@@ -5,11 +5,13 @@ module Vagrant
|
|
5
5
|
# Atomic counter implementation. This is useful for incrementing
|
6
6
|
# a counter which is guaranteed to only be used once in its class.
|
7
7
|
module Counter
|
8
|
-
def get_and_update_counter
|
8
|
+
def get_and_update_counter(name=nil)
|
9
|
+
name ||= :global
|
10
|
+
|
9
11
|
mutex.synchronize do
|
10
|
-
@__counter ||= 1
|
11
|
-
result = @__counter
|
12
|
-
@__counter += 1
|
12
|
+
@__counter ||= Hash.new(1)
|
13
|
+
result = @__counter[name]
|
14
|
+
@__counter[name] += 1
|
13
15
|
result
|
14
16
|
end
|
15
17
|
end
|
@@ -8,13 +8,20 @@ module Vagrant
|
|
8
8
|
# forking.
|
9
9
|
module SafeExec
|
10
10
|
def safe_exec(command)
|
11
|
+
# Create a list of things to rescue from. Since this is OS
|
12
|
+
# specific, we need to do some defined? checks here to make
|
13
|
+
# sure they exist.
|
14
|
+
rescue_from = []
|
15
|
+
rescue_from << Errno::EOPNOTSUPP if defined?(Errno::EOPNOTSUPP)
|
16
|
+
rescue_from << Errno::E045 if defined?(Errno::E045)
|
17
|
+
|
11
18
|
fork_instead = false
|
12
19
|
begin
|
13
20
|
pid = nil
|
14
21
|
pid = fork if fork_instead
|
15
22
|
Kernel.exec(command) if pid.nil?
|
16
23
|
Process.wait(pid) if pid
|
17
|
-
rescue
|
24
|
+
rescue *rescue_from
|
18
25
|
# We retried already, raise the issue and be done
|
19
26
|
raise if fork_instead
|
20
27
|
|
data/lib/vagrant/version.rb
CHANGED
data/lib/vagrant/vm.rb
CHANGED
@@ -66,7 +66,8 @@ module Vagrant
|
|
66
66
|
:redhat => Systems::Redhat,
|
67
67
|
:suse => Systems::Suse,
|
68
68
|
:linux => Systems::Linux,
|
69
|
-
:solaris => Systems::Solaris
|
69
|
+
:solaris => Systems::Solaris,
|
70
|
+
:arch => Systems::Arch
|
70
71
|
}
|
71
72
|
|
72
73
|
raise Errors::VMSystemError, :_key => :unknown_type, :system => system.to_s if !mapping.has_key?(system)
|
@@ -58,7 +58,7 @@ Vagrant::Config.run do |config|
|
|
58
58
|
# chef.add_role "web"
|
59
59
|
#
|
60
60
|
# # You may also specify custom JSON attributes:
|
61
|
-
# chef.json
|
61
|
+
# chef.json = { :mysql_password => "foo" }
|
62
62
|
# end
|
63
63
|
|
64
64
|
# Enable provisioning with chef server, specifying the chef server URL,
|
@@ -71,7 +71,7 @@ Vagrant::Config.run do |config|
|
|
71
71
|
# HTTP instead of HTTPS depending on your configuration. Also change the
|
72
72
|
# validation key to validation.pem.
|
73
73
|
#
|
74
|
-
# config.vm.provision :
|
74
|
+
# config.vm.provision :chef_client do |chef|
|
75
75
|
# chef.chef_server_url = "https://api.opscode.com/organizations/ORGNAME"
|
76
76
|
# chef.validation_key_path = "ORGNAME-validator.pem"
|
77
77
|
# end
|
data/templates/locales/en.yml
CHANGED
@@ -127,7 +127,7 @@ en:
|
|
127
127
|
virtualbox_not_detected: |-
|
128
128
|
Vagrant could not detect VirtualBox! Make sure VirtualBox is properly installed.
|
129
129
|
If VirtualBox is installed, it may be an incorrect version. Vagrant currently
|
130
|
-
requires VirtualBox 4.
|
130
|
+
requires VirtualBox 4.1.x. Please install the proper version to continue.
|
131
131
|
|
132
132
|
If you have an older or newer version of VirtualBox, please make sure you're
|
133
133
|
using the proper version of Vagrant. Ask the mailing list if you have questions.
|
@@ -182,10 +182,9 @@ en:
|
|
182
182
|
commands:
|
183
183
|
common:
|
184
184
|
vm_not_created: "VM not created. Moving on..."
|
185
|
+
vm_not_running: "VM is not currently running. Please bring it up to run this command."
|
185
186
|
box:
|
186
187
|
no_installed_boxes: "There are no installed boxes! Use `vagrant box add` to add some."
|
187
|
-
ssh:
|
188
|
-
command: "Command: %{command}"
|
189
188
|
status:
|
190
189
|
aborted: |-
|
191
190
|
The VM is in an aborted state. This means that it was abruptly
|
@@ -0,0 +1,9 @@
|
|
1
|
+
|
2
|
+
#VAGRANT-BEGIN
|
3
|
+
# The contents below are automatically generated by Vagrant.
|
4
|
+
# Please do not modify any of these contents.
|
5
|
+
interface=eth<%= net_options[:adapter] %>
|
6
|
+
address=<%= net_options[:ip]%>
|
7
|
+
netmask=<%= net_options[:netmask] %>
|
8
|
+
gateway=
|
9
|
+
#VAGRANT-END
|
@@ -86,8 +86,8 @@ class ChefSoloProvisionerTest < Test::Unit::TestCase
|
|
86
86
|
:provisioning_path => @config.provisioning_path,
|
87
87
|
:cookbooks_path => @action.guest_paths(@action.cookbook_folders),
|
88
88
|
:recipe_url => @config.recipe_url,
|
89
|
-
:roles_path => @action.guest_paths(@action.role_folders),
|
90
|
-
:data_bags_path => @action.guest_paths(@action.data_bags_folders)
|
89
|
+
:roles_path => @action.guest_paths(@action.role_folders).first,
|
90
|
+
:data_bags_path => @action.guest_paths(@action.data_bags_folders).first
|
91
91
|
})
|
92
92
|
|
93
93
|
@action.setup_solo_config
|
@@ -25,6 +25,17 @@ class ChefProvisionerTest < Test::Unit::TestCase
|
|
25
25
|
assert result !~ /"json":/
|
26
26
|
end
|
27
27
|
|
28
|
+
should "not include the 'run_list' key in json if not accessed" do
|
29
|
+
result = @config.merged_json
|
30
|
+
assert !result.has_key?(:run_list)
|
31
|
+
end
|
32
|
+
|
33
|
+
should "include the 'run_list' key in json if it is set" do
|
34
|
+
@config.run_list << "foo"
|
35
|
+
result = @config.merged_json
|
36
|
+
assert result.has_key?(:run_list)
|
37
|
+
end
|
38
|
+
|
28
39
|
should "provide accessors to the run list" do
|
29
40
|
@config.run_list << "foo"
|
30
41
|
assert !@config.run_list.empty?
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 53
|
5
|
+
prerelease:
|
5
6
|
segments:
|
6
7
|
- 0
|
7
8
|
- 8
|
8
|
-
-
|
9
|
-
version: 0.8.
|
9
|
+
- 5
|
10
|
+
version: 0.8.5
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Mitchell Hashimoto
|
@@ -15,171 +16,194 @@ autorequire:
|
|
15
16
|
bindir: bin
|
16
17
|
cert_chain: []
|
17
18
|
|
18
|
-
date: 2011-
|
19
|
-
default_executable:
|
19
|
+
date: 2011-08-16 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
23
|
+
none: false
|
23
24
|
requirements:
|
24
25
|
- - "="
|
25
26
|
- !ruby/object:Gem::Version
|
27
|
+
hash: 15
|
26
28
|
segments:
|
27
29
|
- 0
|
28
30
|
- 5
|
29
31
|
- 2
|
30
32
|
version: 0.5.2
|
31
|
-
requirement: *id001
|
32
33
|
name: archive-tar-minitar
|
33
34
|
prerelease: false
|
34
35
|
type: :runtime
|
36
|
+
requirement: *id001
|
35
37
|
- !ruby/object:Gem::Dependency
|
36
38
|
version_requirements: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
37
40
|
requirements:
|
38
41
|
- - ~>
|
39
42
|
- !ruby/object:Gem::Version
|
43
|
+
hash: 19
|
40
44
|
segments:
|
41
45
|
- 2
|
42
46
|
- 7
|
43
47
|
- 0
|
44
48
|
version: 2.7.0
|
45
|
-
requirement: *id002
|
46
49
|
name: erubis
|
47
50
|
prerelease: false
|
48
51
|
type: :runtime
|
52
|
+
requirement: *id002
|
49
53
|
- !ruby/object:Gem::Dependency
|
50
54
|
version_requirements: &id003 !ruby/object:Gem::Requirement
|
55
|
+
none: false
|
51
56
|
requirements:
|
52
57
|
- - ~>
|
53
58
|
- !ruby/object:Gem::Version
|
59
|
+
hash: 1
|
54
60
|
segments:
|
55
61
|
- 1
|
56
62
|
- 5
|
57
63
|
- 1
|
58
64
|
version: 1.5.1
|
59
|
-
requirement: *id003
|
60
65
|
name: json
|
61
66
|
prerelease: false
|
62
67
|
type: :runtime
|
68
|
+
requirement: *id003
|
63
69
|
- !ruby/object:Gem::Dependency
|
64
70
|
version_requirements: &id004 !ruby/object:Gem::Requirement
|
71
|
+
none: false
|
65
72
|
requirements:
|
66
73
|
- - ~>
|
67
74
|
- !ruby/object:Gem::Version
|
75
|
+
hash: 3
|
68
76
|
segments:
|
69
77
|
- 2
|
70
78
|
- 1
|
71
79
|
- 4
|
72
80
|
version: 2.1.4
|
73
|
-
requirement: *id004
|
74
81
|
name: net-ssh
|
75
82
|
prerelease: false
|
76
83
|
type: :runtime
|
84
|
+
requirement: *id004
|
77
85
|
- !ruby/object:Gem::Dependency
|
78
86
|
version_requirements: &id005 !ruby/object:Gem::Requirement
|
87
|
+
none: false
|
79
88
|
requirements:
|
80
89
|
- - ~>
|
81
90
|
- !ruby/object:Gem::Version
|
91
|
+
hash: 31
|
82
92
|
segments:
|
83
93
|
- 1
|
84
94
|
- 0
|
85
95
|
- 4
|
86
96
|
version: 1.0.4
|
87
|
-
requirement: *id005
|
88
97
|
name: net-scp
|
89
98
|
prerelease: false
|
90
99
|
type: :runtime
|
100
|
+
requirement: *id005
|
91
101
|
- !ruby/object:Gem::Dependency
|
92
102
|
version_requirements: &id006 !ruby/object:Gem::Requirement
|
103
|
+
none: false
|
93
104
|
requirements:
|
94
105
|
- - ~>
|
95
106
|
- !ruby/object:Gem::Version
|
107
|
+
hash: 11
|
96
108
|
segments:
|
97
109
|
- 0
|
98
110
|
- 5
|
99
111
|
- 0
|
100
112
|
version: 0.5.0
|
101
|
-
requirement: *id006
|
102
113
|
name: i18n
|
103
114
|
prerelease: false
|
104
115
|
type: :runtime
|
116
|
+
requirement: *id006
|
105
117
|
- !ruby/object:Gem::Dependency
|
106
118
|
version_requirements: &id007 !ruby/object:Gem::Requirement
|
119
|
+
none: false
|
107
120
|
requirements:
|
108
121
|
- - ~>
|
109
122
|
- !ruby/object:Gem::Version
|
123
|
+
hash: 43
|
110
124
|
segments:
|
111
125
|
- 0
|
112
126
|
- 14
|
113
127
|
- 6
|
114
128
|
version: 0.14.6
|
115
|
-
requirement: *id007
|
116
129
|
name: thor
|
117
130
|
prerelease: false
|
118
131
|
type: :runtime
|
132
|
+
requirement: *id007
|
119
133
|
- !ruby/object:Gem::Dependency
|
120
134
|
version_requirements: &id008 !ruby/object:Gem::Requirement
|
135
|
+
none: false
|
121
136
|
requirements:
|
122
137
|
- - ~>
|
123
138
|
- !ruby/object:Gem::Version
|
139
|
+
hash: 57
|
124
140
|
segments:
|
125
141
|
- 0
|
126
142
|
- 9
|
127
143
|
- 1
|
128
144
|
version: 0.9.1
|
129
|
-
requirement: *id008
|
130
145
|
name: virtualbox
|
131
146
|
prerelease: false
|
132
147
|
type: :runtime
|
148
|
+
requirement: *id008
|
133
149
|
- !ruby/object:Gem::Dependency
|
134
150
|
version_requirements: &id009 !ruby/object:Gem::Requirement
|
151
|
+
none: false
|
135
152
|
requirements:
|
136
153
|
- - ">="
|
137
154
|
- !ruby/object:Gem::Version
|
155
|
+
hash: 3
|
138
156
|
segments:
|
139
157
|
- 0
|
140
158
|
version: "0"
|
141
|
-
requirement: *id009
|
142
159
|
name: rake
|
143
160
|
prerelease: false
|
144
161
|
type: :development
|
162
|
+
requirement: *id009
|
145
163
|
- !ruby/object:Gem::Dependency
|
146
164
|
version_requirements: &id010 !ruby/object:Gem::Requirement
|
165
|
+
none: false
|
147
166
|
requirements:
|
148
167
|
- - ">="
|
149
168
|
- !ruby/object:Gem::Version
|
169
|
+
hash: 31
|
150
170
|
segments:
|
151
171
|
- 0
|
152
172
|
- 1
|
153
173
|
- 2
|
154
174
|
version: 0.1.2
|
155
|
-
requirement: *id010
|
156
175
|
name: contest
|
157
176
|
prerelease: false
|
158
177
|
type: :development
|
178
|
+
requirement: *id010
|
159
179
|
- !ruby/object:Gem::Dependency
|
160
180
|
version_requirements: &id011 !ruby/object:Gem::Requirement
|
181
|
+
none: false
|
161
182
|
requirements:
|
162
183
|
- - ">="
|
163
184
|
- !ruby/object:Gem::Version
|
185
|
+
hash: 3
|
164
186
|
segments:
|
165
187
|
- 0
|
166
188
|
version: "0"
|
167
|
-
requirement: *id011
|
168
189
|
name: mocha
|
169
190
|
prerelease: false
|
170
191
|
type: :development
|
192
|
+
requirement: *id011
|
171
193
|
- !ruby/object:Gem::Dependency
|
172
194
|
version_requirements: &id012 !ruby/object:Gem::Requirement
|
195
|
+
none: false
|
173
196
|
requirements:
|
174
197
|
- - ">="
|
175
198
|
- !ruby/object:Gem::Version
|
199
|
+
hash: 3
|
176
200
|
segments:
|
177
201
|
- 0
|
178
202
|
version: "0"
|
179
|
-
requirement: *id012
|
180
203
|
name: ruby-debug
|
181
204
|
prerelease: false
|
182
205
|
type: :development
|
206
|
+
requirement: *id012
|
183
207
|
description: Vagrant is a tool for building and distributing virtualized development environments.
|
184
208
|
email:
|
185
209
|
- mitchell.hashimoto@gmail.com
|
@@ -312,6 +336,7 @@ files:
|
|
312
336
|
- lib/vagrant/ssh.rb
|
313
337
|
- lib/vagrant/ssh/session.rb
|
314
338
|
- lib/vagrant/systems.rb
|
339
|
+
- lib/vagrant/systems/arch.rb
|
315
340
|
- lib/vagrant/systems/base.rb
|
316
341
|
- lib/vagrant/systems/debian.rb
|
317
342
|
- lib/vagrant/systems/freebsd.rb
|
@@ -341,6 +366,7 @@ files:
|
|
341
366
|
- templates/commands/init/Vagrantfile.erb
|
342
367
|
- templates/config/validation_failed.erb
|
343
368
|
- templates/locales/en.yml
|
369
|
+
- templates/network_entry_arch.erb
|
344
370
|
- templates/network_entry_debian.erb
|
345
371
|
- templates/network_entry_gentoo.erb
|
346
372
|
- templates/network_entry_redhat.erb
|
@@ -436,7 +462,6 @@ files:
|
|
436
462
|
- test/vagrant/util/template_renderer_test.rb
|
437
463
|
- test/vagrant/vm_test.rb
|
438
464
|
- vagrant.gemspec
|
439
|
-
has_rdoc: true
|
440
465
|
homepage: http://vagrantup.com
|
441
466
|
licenses: []
|
442
467
|
|
@@ -446,16 +471,20 @@ rdoc_options: []
|
|
446
471
|
require_paths:
|
447
472
|
- lib
|
448
473
|
required_ruby_version: !ruby/object:Gem::Requirement
|
474
|
+
none: false
|
449
475
|
requirements:
|
450
476
|
- - ">="
|
451
477
|
- !ruby/object:Gem::Version
|
478
|
+
hash: 3
|
452
479
|
segments:
|
453
480
|
- 0
|
454
481
|
version: "0"
|
455
482
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
483
|
+
none: false
|
456
484
|
requirements:
|
457
485
|
- - ">="
|
458
486
|
- !ruby/object:Gem::Version
|
487
|
+
hash: 23
|
459
488
|
segments:
|
460
489
|
- 1
|
461
490
|
- 3
|
@@ -464,7 +493,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
464
493
|
requirements: []
|
465
494
|
|
466
495
|
rubyforge_project: vagrant
|
467
|
-
rubygems_version: 1.
|
496
|
+
rubygems_version: 1.8.5
|
468
497
|
signing_key:
|
469
498
|
specification_version: 3
|
470
499
|
summary: Build and distribute virtualized development environments.
|