Merge pull request #1175 from petere/puppet-exitcodes

Check exit codes of puppet provisioners
This commit is contained in:
Mitchell Hashimoto 2012-10-12 19:56:19 -07:00
commit 3d0c82edad
2 changed files with 2 additions and 2 deletions

View File

@ -153,7 +153,7 @@ module VagrantPlugins
facter = "#{facts.join(" ")} "
end
command = "cd #{manifests_guest_path} && #{facter}puppet apply #{options}"
command = "cd #{manifests_guest_path} && #{facter}puppet apply #{options} --detailed-exitcodes || [ $? -eq 2 ]"
env[:ui].info I18n.t("vagrant.provisioners.puppet.running_puppet",
:manifest => @manifest_file)

View File

@ -67,7 +67,7 @@ module VagrantPlugins
facter = "#{facts.join(" ")} "
end
command = "#{facter}puppet agent #{options} --server #{config.puppet_server}"
command = "#{facter}puppet agent #{options} --server #{config.puppet_server} --detailed-exitcodes || [ $? -eq 2 ]"
env[:ui].info I18n.t("vagrant.provisioners.puppet_server.running_puppetd")
env[:vm].channel.sudo(command) do |type, data|