Commit Graph

11 Commits (d9152eb583b0030e93513a67b81ede85d5da5f18)

Author SHA1 Message Date
Michael DeHaan 3d25b4a7c0 Standardize args/kwargs on connection plugins. 2013-04-05 14:50:15 -04:00
Daniel Hokka Zakrisson a1e00c93e5 Add ansible_ssh_user/pass to enable inventory-defined users 2013-02-10 23:22:18 +01:00
Daniel Hokka Zakrisson d11262af4d Fix raw (no executable) support on -c local 2013-01-13 15:16:13 +01:00
Daniel Hokka Zakrisson 5231be5d4b Add sudo password support for local 2013-01-13 15:16:13 +01:00
Daniel Hokka Zakrisson 7ecab22302 Move sudo command making to one common function 2013-01-13 15:16:13 +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
Daniel Hokka Zakrisson 97cc384ccf Set basedir to . if there isn't one
This avoids special-casing '' = '.' everywhere the basedir gets used.
Fixes #1729.
2012-12-19 13:22:57 +01:00
Daniel Hokka Zakrisson db1a65342a Set -c local cwd to . if basedir is empty 2012-11-23 13:36:09 +01:00
Daniel Hokka Zakrisson bdf05ec9a0 Use runner's basedir as cwd for -c local 2012-11-20 15:36:43 +01:00
Michael DeHaan 3de4e45741 Move plugin directories 2012-08-21 20:32:21 -04:00