Chef solo config uses new template system

This commit is contained in:
Mitchell Hashimoto 2010-04-08 20:56:48 -07:00
parent 419cc02e75
commit 47a9d85b4e
3 changed files with 7 additions and 4 deletions

View File

@ -20,10 +20,10 @@ module Vagrant
end
def setup_solo_config
solo_file = <<-solo
file_cache_path "#{env.config.chef.provisioning_path}"
cookbook_path #{cookbooks_path}
solo
solo_file = TemplateRenderer.render("chef_solo_solo", {
:provisioning_path => env.config.chef.provisioning_path,
:cookbooks_path => cookbooks_path
})
logger.info "Uploading chef-solo configuration script..."
env.ssh.upload!(StringIO.new(solo_file), File.join(env.config.chef.provisioning_path, "solo.rb"))

View File

@ -0,0 +1,2 @@
file_cache_path "<%= provisioning_path %>"
cookbook_path <%= cookbooks_path %>

View File

@ -103,6 +103,7 @@ config
end
should "upload this file as solo.rb to the provisioning folder" do
Vagrant::Util::TemplateRenderer.expects(:render).returns("foo")
@action.expects(:cookbooks_path).returns("cookbooks")
StringIO.expects(:new).returns("foo")
File.expects(:join).with(@env.config.chef.provisioning_path, "solo.rb").once.returns("bar")