Chef solo config uses new template system
This commit is contained in:
parent
419cc02e75
commit
47a9d85b4e
|
@ -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"))
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
file_cache_path "<%= provisioning_path %>"
|
||||
cookbook_path <%= cookbooks_path %>
|
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue