saltstack/salt — pull request #10435 by plastikos (2014-02-13 23:35:19+00:00)
Title:  Preserve stdout, stderr and retcode from salt-ssh raw command

This is for review purposes *only* at this point. I believe that this
works. However it should receive additional scrutiny because I am
unfamiliar with the "retcode-passthrough" and "local" concepts - which
this may impact. This may be significant in locations where stdout is
processed with salt.utils.find_json and the 'local' value is
extracted.

=========

salt-ssh raw mode only emits stdout lines; it emits neither stderr nor
the return code. salt-ssh raw works more like cmd.run rather than
cmd.run_all. Preserving stdout, stderr and the return code are
imperative for validating the results of a salt-ssh raw command.

This stores 'stdout', 'stderr' and 'retcode' in the ret dictionary so
that the complete information can be emitted by the outputter.

Fixes #10432