Fix Ansible provisioner exit code reporting

In eb70c0d6bb we were trying to compare a Subprocess::Result to a
Fixnum, resulting in Vagrant always reporting failure regardless of
Ansible's exit code.
This commit is contained in:
Ches Martin 2013-07-30 19:25:15 +07:00
parent a2925f0ff5
commit d937cca495
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