Commit Graph

9 Commits (02fdec102ebfd3315d804ac851a5688e45b43ac6)

Author SHA1 Message Date
Dag Wieers 0ef97cd917 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.
12 years ago
Jan-Piet Mens d184f72aa9 DOCUMENTATION strings 12 years ago
Michael DeHaan 6f6559670f chmod -x for all module files in source checkout 12 years ago
Michael DeHaan 78669c57d5 Module documentation should have options sorted 12 years ago
Jan-Piet Mens a790c399f4 Added attribution to all module DOCUMENTATION strings 12 years ago
Jan-Piet Mens af1f925eea Tweak DOCUMENTATION YAML as per latest 991 12 years ago
Jan-Piet Mens 952a82cca0 First attempt at standardizing DOCUMENTATION string (new DICT) 12 years ago
Michael DeHaan 31d9111857 Setup module no longer saves to disk, as templates are mostly useful in playbooks and this allows lots of simplifications
around file pathing and removes occasional permissions conflicts depending on how things are used.
13 years ago
Michael DeHaan 5feeac9987 add fake module for 'raw' 13 years ago