From 95d7b4c5dbbf779b49bd906fe4f141c2508912af Mon Sep 17 00:00:00 2001 From: Marco Vito Moscaritolo Date: Sat, 29 Sep 2012 21:02:07 +0200 Subject: [PATCH] Added DOCUMENTATION to supervisorctl module. --- library/supervisorctl | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/library/supervisorctl b/library/supervisorctl index 880388abd5..ff45af8496 100755 --- a/library/supervisorctl +++ b/library/supervisorctl @@ -19,6 +19,32 @@ # along with Ansible. If not, see . # +DOCUMENTATION = ''' +--- +module: supervisorctl +short_description: Manage the state of a program or group of programs running via Supervisord +description: + - Manage the state of a program or group of programs running via Supervisord +version_added: "0.7" +options: + name: + description: + - The name of the supervisord program/process to manage + required: true + default: null + state: + description: + - The state of service + required: true + default: null + choices: [ "started", "stopped", "restarted" ] +examples: + - code: supervisorctl name=my_app state=started + description: Manage the state of program I(my_app) to be in I(started) state. +requirements: [ ] +author: Matt Wright +''' + def _is_present(name, supervisorctl): rc, out, err = _run('%s status' % supervisorctl) return name in out