Merge pull request #2007 from ches/ansible-exit-status
provisioners/ansible: Fix Ansible provisioner exit code reporting
This commit is contained in:
commit
269f7c2cc6
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue