From 7a3b2ac287b5b62e8211e04a44911e216a740bf6 Mon Sep 17 00:00:00 2001 From: Jan-Piet Mens Date: Sun, 30 Sep 2012 12:40:11 +0200 Subject: [PATCH] DOCUMENTATION for virt --- library/virt | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/library/virt b/library/virt index 5d69e36769..43b9b8b8e2 100755 --- a/library/virt +++ b/library/virt @@ -15,6 +15,45 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . """ +DOCUMENTATION = ''' +--- +module: virt +short_description: Manages virtual machines supported by libvirt +description: + - Manages virtual machines supported by I(libvirt). +version_added: "0.2" +options: + name: + description: + - name of the guest VM being managed + required: true + default: null + aliases: [] + state: + description: + - Note that there may be some lag for state requests like C(shutdown) + since these refer only to VM states. After starting a guest, it may not + be immediately accessible. + required: false + choices: [ "running", "shutdown", "destroyed", "undefined" ] + default: "no" + command: + description: + - in addition to state management, various non-idempotent commands are available. See examples + required: false +examples: + - code: virt guest=alpha state=running + description: "Example from Ansible Playbooks" + - code: ansible host -m virt -a "guest=alpha command=status" + description: "Example guest management with C(/usr/bin/ansible)" +notes: + - "Other non-idempotent commands are: C(status), C(pause), C(unpause), + C(get_xml), C(autostart), C(freemem), C(list_vms), C(info), C(nodeinfo), + C(virttype)" +requirements: [ "libvirt" ] +author: Seth Vidal +''' + VIRT_FAILED = 1 VIRT_SUCCESS = 0 VIRT_UNAVAILABLE=2