vagrantup 0.8.2 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -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 +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d99515c869416f571664def118983a7b21ae49c
|
4
|
+
data.tar.gz: 43e8ece0b474a752f3107b04a38d0003ebf828cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67c5b0a958f82b6b4cd2ef3c401b99245ef89b36fcb742bfe47e64d349279cb60c0e871cceaa6d9f5b4b43b77283ae539b0977513ef9d4192c08a2a17ec387a9
|
7
|
+
data.tar.gz: 0b27041e1dbc68154cc5fd11d37b7d99cf76d94a6f352ac3668a4c71021c3179a70a90de8dd94bc4c3ba9138c09ef4dadd87574d711ae10337bfc7001b027043
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
## 0.8.3 (August 15, 2011)
|
2
|
+
|
3
|
+
- Fix SSH `exec!` to inherit proper `$PATH`. [GH-426]
|
4
|
+
- Chef client now accepts an empty (`nil`) run list again. [GH-429]
|
5
|
+
- Fix incorrect error message when running `provision` on halted VM. [GH-447]
|
6
|
+
- Checking guest addition versions now ignores OSE. [GH-438]
|
7
|
+
- Chef solo from a remote URL fixed. [GH-431]
|
8
|
+
- Arch linux support: host only networks and changing the host name. [GH-439] [GH-448]
|
9
|
+
- Chef solo `roles_path` and `data_bags_path` can only be be single paths. [GH-446]
|
10
|
+
- Fix `virtualbox_not_detected` error message to require 4.1.x. [GH-458]
|
11
|
+
- Add shortname (`hostname -s`) for hostname setting on RHEL systems. [GH-456]
|
12
|
+
- `vagrant ssh -c` output no longer has a prefix and respects newlines
|
13
|
+
from the output. [GH-462]
|
14
|
+
|
1
15
|
## 0.8.2 (July 22, 2011)
|
2
16
|
|
3
17
|
- 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,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrantup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mitchell Hashimoto
|
@@ -310,6 +310,7 @@ files:
|
|
310
310
|
- lib/vagrant/ssh.rb
|
311
311
|
- lib/vagrant/ssh/session.rb
|
312
312
|
- lib/vagrant/systems.rb
|
313
|
+
- lib/vagrant/systems/arch.rb
|
313
314
|
- lib/vagrant/systems/base.rb
|
314
315
|
- lib/vagrant/systems/debian.rb
|
315
316
|
- lib/vagrant/systems/freebsd.rb
|
@@ -339,6 +340,7 @@ files:
|
|
339
340
|
- templates/commands/init/Vagrantfile.erb
|
340
341
|
- templates/config/validation_failed.erb
|
341
342
|
- templates/locales/en.yml
|
343
|
+
- templates/network_entry_arch.erb
|
342
344
|
- templates/network_entry_debian.erb
|
343
345
|
- templates/network_entry_gentoo.erb
|
344
346
|
- templates/network_entry_redhat.erb
|