Commit graph

12 commits

Author SHA1 Message Date
Daniel Hokka Zakrisson
4955587d8c Merge pull request #1798 from dagwieers/raw-executable
Allow to change executable (shell/interpreter) when using raw
2013-01-08 08:35:08 -08:00
Dag Wieers
eb36ff45b9 Make script module use raw module so it does not require python 2012-12-24 00:24:34 +01:00
Dag Wieers
846161a1a4 Allow to change executable (shell/interpreter) when using raw
This patch adds an optional 'executable=' option to the raw command line to override the default shell (/bin/sh), much like the shell module does.
2012-12-23 20:49:02 +01:00
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
Jan-Piet Mens
caf003c813 DOCUMENTATION strings 2012-11-21 18:49:30 +01:00
Michael DeHaan
663a8fef3f chmod -x for all module files in source checkout 2012-11-19 13:47:40 -05:00
Michael DeHaan
626203a7c9 Module documentation should have options sorted 2012-11-03 18:52:59 -04:00
Jan-Piet Mens
a72a6e42c5 Added attribution to all module DOCUMENTATION strings 2012-10-01 12:37:51 +02:00
Jan-Piet Mens
60e0410298 Tweak DOCUMENTATION YAML as per latest 991 2012-09-19 16:09:26 +02:00
Jan-Piet Mens
e041c2e2cd First attempt at standardizing DOCUMENTATION string (new DICT) 2012-09-18 14:04:43 +02:00
Michael DeHaan
931f9f1a61 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.
2012-07-14 11:59:12 -04:00
Michael DeHaan
54a56e478b add fake module for 'raw' 2012-05-10 01:08:01 -04:00