provide absolute paths for solo.rb and dna.js in order to make it work correctly with the restart cookbook https://github.com/dreamcat4/site-cookbooks/tree/COOK-245/restart/

This commit is contained in:
Maksim Horbul 2011-05-18 15:22:36 -07:00 committed by Mitchell Hashimoto
parent e8dce40992
commit 23bb514100
2 changed files with 5 additions and 4 deletions

View File

@ -71,7 +71,8 @@ module Vagrant
def run_chef_solo
command_env = config.binary_env ? "#{config.binary_env} " : ""
commands = ["cd #{config.provisioning_path}", "#{command_env}#{chef_binary_path("chef-solo")} -c solo.rb -j dna.json"]
commands = ["cd #{config.provisioning_path}",
"#{command_env}#{chef_binary_path("chef-solo")} -c #{config.provisioning_path}/solo.rb -j #{config.provisioning_path}/dna.json"]
env.ui.info I18n.t("vagrant.provisioners.chef.running_solo")
vm.ssh.execute do |ssh|

View File

@ -250,7 +250,7 @@ class ChefSoloProvisionerTest < Test::Unit::TestCase
end
should "cd into the provisioning directory and run chef solo" do
@ssh.expects(:sudo!).with(["cd #{@config.provisioning_path}", "chef-solo -c solo.rb -j dna.json"]).once
@ssh.expects(:sudo!).with(["cd #{@config.provisioning_path}", "chef-solo -c #{@config.provisioning_path}/solo.rb -j #{@config.provisioning_path}/dna.json"]).once
@action.run_chef_solo
end