Merge pull request #2007 from ches/ansible-exit-status

provisioners/ansible: Fix Ansible provisioner exit code reporting
This commit is contained in:
Mitchell Hashimoto 2013-08-09 11:17:52 -07:00
commit 269f7c2cc6
1 changed files with 2 additions and 2 deletions

View File

@ -31,13 +31,13 @@ module VagrantPlugins
}
begin
exit_status = Vagrant::Util::Subprocess.execute(*command) do |type, data|
result = Vagrant::Util::Subprocess.execute(*command) do |type, data|
if type == :stdout || type == :stderr
@machine.env.ui.info(data, :new_line => false, :prefix => false)
end
end
raise Vagrant::Errors::AnsibleFailed if exit_status != 0
raise Vagrant::Errors::AnsibleFailed if result.exit_code != 0
rescue Vagrant::Util::Subprocess::LaunchError
raise Vagrant::Errors::AnsiblePlaybookAppNotFound
end