Commit graph

13 commits

Author SHA1 Message Date
Seth Vidal
70f4956420 new service module handles enable=on/off for chkconfigging it on 2012-05-01 17:46:45 -04:00
Michael DeHaan
7c9c3b306a Fix handling of list=status such that it will actually work in absense of the state command, to
make it useful from /usr/bin/ansible and the API.  Also some minor style fixes.
2012-04-26 22:43:36 -04:00
John Kleint
c8a542dda9 Get service module working with sudo, add list=status, better error messages.
When running the service module via sudo, `$PATH` didn't contain `/sbin`,
so the service binary couldn't be found.  This just runs `/sbin/service`
directly.  Output is spewed to stderr on error.

Added `list=status` to include the output of `service <cmd> status`.
2012-04-27 13:35:24 -04:00
jkleint
808cd1b4e9 Service module crashes if args has no "=". 2012-04-26 10:48:50 -03:00
Michael DeHaan
6f55ded1c3 Be more flexible about where the service binary lives for better cross platform support. 2012-03-30 22:57:26 -04:00
Michael DeHaan
2e060c537f Added preliminary support for --sudo to ansible, playbook support and further testing pending. 2012-03-29 01:37:06 -04:00
Christopher Johnston
4183a96495 add support for running and started - both will do the same thing 2012-03-28 16:06:26 -07:00
Michael DeHaan
cace2e7239 Added the 'test-module' script, useful for testing modules without running them in Ansible. 2012-03-14 21:49:27 -04:00
Seth Vidal
903178cdd4 convert so they handle argsfiles rather than arguments 2012-03-14 18:47:13 -04:00
Michael DeHaan
1bd1552b43 Relicensing to GPLv3, all previous committers ok'd on mailing list. 2012-02-28 19:08:09 -05:00
Michael DeHaan
8f9320aa05 Rename 'ensure' to 'state' because I think it's a bit cleaner and doesn't imply
all modules take a common parameter name.  But more or less we still work idempotently
in modules.
2012-02-26 22:31:42 -05:00
Michael DeHaan
30bc528091 Have to return the return code on failure, it's a rule! 2012-02-25 21:00:51 -05:00
Michael DeHaan
93a0cf0be4 A basic service module with 'ensure' idempotence semantics. Playbook updated to use service
module vs command module for restarting.  May be some bugs and requires the service to implement 'status' -- and probably some better error handling (i.e. return JSON with "failed" element if failed).

Improvements welcome.
2012-02-25 20:27:11 -05:00