Commit Graph

63 Commits (9cb710b2f730a69377449b36a4e5ececb3e82d8a)

Author SHA1 Message Date
Seth Vidal dc30b01c87 new service module handles enable=on/off for chkconfigging it on 13 years ago
Michael DeHaan b56efa7809 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.
13 years ago
John Kleint c6db4e8fa3 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`.
13 years ago
jkleint 30ce430363 Service module crashes if args has no "=". 13 years ago
Michael DeHaan d86dad76ba Be more flexible about where the service binary lives for better cross platform support. 13 years ago
Michael DeHaan 81e3496037 Added preliminary support for --sudo to ansible, playbook support and further testing pending. 13 years ago
Christopher Johnston 509c330f53 add support for running and started - both will do the same thing 13 years ago
Michael DeHaan a735dd2b17 Added the 'test-module' script, useful for testing modules without running them in Ansible. 13 years ago
Seth Vidal 1f53c89b14 convert so they handle argsfiles rather than arguments 13 years ago
Michael DeHaan be4cb64c92 Relicensing to GPLv3, all previous committers ok'd on mailing list. 13 years ago
Michael DeHaan ba4e36a9a9 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.
13 years ago
Michael DeHaan bfd93081ae Have to return the return code on failure, it's a rule! 13 years ago
Michael DeHaan d308254eae 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.
13 years ago