Allow the node_name to be set for the ChefSolo Provisioner.

This commit is contained in:
Dylan Egan 2010-07-06 19:17:18 +10:00 committed by Mitchell Hashimoto
parent febfd81b68
commit f5756cdfc5
3 changed files with 4 additions and 1 deletions

View File

@ -29,6 +29,7 @@ module Vagrant
def setup_solo_config def setup_solo_config
setup_config("chef_solo_solo", "solo.rb", { setup_config("chef_solo_solo", "solo.rb", {
:node_name => env.config.chef.node_name,
:provisioning_path => env.config.chef.provisioning_path, :provisioning_path => env.config.chef.provisioning_path,
:cookbooks_path => cookbooks_path, :cookbooks_path => cookbooks_path,
:roles_path => roles_path :roles_path => roles_path

View File

@ -1,3 +1,4 @@
node_name "<%= node_name %>"
file_cache_path "<%= provisioning_path %>" file_cache_path "<%= provisioning_path %>"
cookbook_path <%= cookbooks_path %> cookbook_path <%= cookbooks_path %>
role_path <%= roles_path %> role_path <%= roles_path %>

View File

@ -154,6 +154,7 @@ class ChefSoloProvisionerTest < Test::Unit::TestCase
should "call setup_config with proper variables" do should "call setup_config with proper variables" do
@action.expects(:setup_config).with("chef_solo_solo", "solo.rb", { @action.expects(:setup_config).with("chef_solo_solo", "solo.rb", {
:node_name => @env.config.chef.node_name,
:provisioning_path => @env.config.chef.provisioning_path, :provisioning_path => @env.config.chef.provisioning_path,
:cookbooks_path => @action.cookbooks_path, :cookbooks_path => @action.cookbooks_path,
:roles_path => @action.roles_path :roles_path => @action.roles_path