1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/lib/ansible/runner/connection_plugins
Dag Wieers 988db558b3 Add return code and error output to raw module
Since we use 'raw' heavily on equipment where 'command' and 'shell' are not (yet) working (and python may need to be installed first using raw) these improvements are necessary in order to write more complex scripts (with return code handling and separated stdout/stderr).

This change includes the following changes:

 - exec_command() now returns the return code of the command
 - _low_level_exec_command() now returns a dict, including 'rc', 'stdout' and 'stderr'
 - all users of the above interfaces have been improved to make use of the above changes
 - all connection plugins have been modified to return rc and stderr
 - fix the newline problem (stdout and stderr would have excess newlines)

In a future commit I intend to add assertions or error handling code to verify the return code in those places where it wasn't done. Since only the output was available, the return code was ignored, even though we expect them to be 0.
2012-12-23 18:04:54 +01:00
..
__init__.py Add __init__'s to git 2012-09-06 18:43:28 -04:00
fireball.py Add return code and error output to raw module 2012-12-23 18:04:54 +01:00
local.py Add return code and error output to raw module 2012-12-23 18:04:54 +01:00
paramiko_ssh.py Add return code and error output to raw module 2012-12-23 18:04:54 +01:00
ssh.py Add return code and error output to raw module 2012-12-23 18:04:54 +01:00