Commit graph

15 commits

Author SHA1 Message Date
Stephen Fromm
e4964f42e0 Update modules to use run_command in module_common.py
This updates apt, apt_repository, command, cron, easy_install, facter,
fireball, git, group, mount, ohai, pip, service, setup, subversion,
supervisorctl, svr4pkg, user, and yum to take advantage of run_command
in module_common.py.
2013-01-13 08:37:19 -08:00
Dag Wieers
cb162046f1 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
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.
2012-12-23 18:04:54 +01:00
Jan-Piet Mens
d184f72aa9 DOCUMENTATION strings 2012-11-21 18:49:30 +01:00
Michael DeHaan
6f6559670f chmod -x for all module files in source checkout 2012-11-19 13:47:40 -05:00
Michael DeHaan
b0e28c1669 Allow fireball to transfer binary files, fixup fireball docs, make fetch work with fireball. 2012-11-14 18:37:17 -05:00
Daniel Hokka Zakrisson
8fba4cc04f Keep fireball from spreading its socket around 2012-11-06 15:10:34 +01:00
Michael DeHaan
8d3f73d562 pep8 fixes 2012-10-30 20:42:07 -04:00
Jan-Piet Mens
d069c57974 Reformat code: examples consistently
- added terse syntax to modules.rst
 - added description of special variables to template module
2012-10-23 15:14:01 +02:00
Jan-Piet Mens
800d830c2b module_formatter: .rst now correctly handles code examples
- fixed template (it was the template), adding indentation with Jinja2
 - added description of code examples to man-page template (was missing)
 - fixed fireball, cron, and debug module examples to confrom
2012-10-18 13:49:19 +02:00
Michael DeHaan
37dedf719d implement lookup plugins for arbitrary enumeration over arbitrary things. See the mailing list for some cool examples. 2012-10-12 20:07:05 -04:00
Michael DeHaan
ef7811e4d4 Teach fireball mode to disable the fireball by paying attention to 'minutes=N' (default 30) and do not let fireball module crash
on input.
2012-10-01 22:41:00 -04:00
Jan-Piet Mens
8baea3d38a fireball DOCUMENTATION
- amended
2012-10-01 14:39:15 +02:00
Jan-Piet Mens
a804eb8866 template DOCUMENTATION added to fireball 2012-09-30 14:50:32 +02:00
Michael DeHaan
99c98a0875 The very first start of 'fireball mode', which uses ansible in SSH mode to deploy a ephemeral zeromq daemon (entirely optional) that is will die after
it is no longer used.  No key signing will be required.  At this point, development use only -- NOT complete.
2012-09-26 23:51:59 -04:00