diff --git a/lib/vagrant/provisioners/chef_solo.rb b/lib/vagrant/provisioners/chef_solo.rb index 825e327de..1f0ff9264 100644 --- a/lib/vagrant/provisioners/chef_solo.rb +++ b/lib/vagrant/provisioners/chef_solo.rb @@ -29,6 +29,7 @@ module Vagrant def setup_solo_config setup_config("chef_solo_solo", "solo.rb", { + :node_name => env.config.chef.node_name, :provisioning_path => env.config.chef.provisioning_path, :cookbooks_path => cookbooks_path, :roles_path => roles_path diff --git a/templates/chef_solo_solo.erb b/templates/chef_solo_solo.erb index 407653c87..b8557272a 100644 --- a/templates/chef_solo_solo.erb +++ b/templates/chef_solo_solo.erb @@ -1,4 +1,5 @@ +node_name "<%= node_name %>" file_cache_path "<%= provisioning_path %>" cookbook_path <%= cookbooks_path %> role_path <%= roles_path %> -log_level <%= log_level.inspect %> \ No newline at end of file +log_level <%= log_level.inspect %> diff --git a/test/vagrant/provisioners/chef_solo_test.rb b/test/vagrant/provisioners/chef_solo_test.rb index ce33a3f09..39496d200 100644 --- a/test/vagrant/provisioners/chef_solo_test.rb +++ b/test/vagrant/provisioners/chef_solo_test.rb @@ -154,6 +154,7 @@ class ChefSoloProvisionerTest < Test::Unit::TestCase should "call setup_config with proper variables" do @action.expects(:setup_config).with("chef_solo_solo", "solo.rb", { + :node_name => @env.config.chef.node_name, :provisioning_path => @env.config.chef.provisioning_path, :cookbooks_path => @action.cookbooks_path, :roles_path => @action.roles_path