ANSIBLE.VIRT(3)                 ANSIBLE MODULES                ANSIBLE.VIRT(3)



NAME
       virt - Manages virtual machines supported by libvirt

DESCRIPTION
       Manages virtual machines supported by libvirt.

OPTIONS
       command
              in addition to state management, various non-idempotent commands
              are available. See examples Choices:
              create,status,start,stop,pause,unpause,shutdown,undefine,destroy,get_xml,autostart,freemem,list_vms,info,nodeinfo,virttype,define.

       name   name of the guest VM being managed. Note that VM must be
              previously defined with xml.(required)

       state  Note that there may be some lag for state requests like shutdown
              since these refer only to VM states. After starting a guest, it
              may not be immediately accessible.  Choices: running,shutdown.
              (default: no)

       uri    libvirt connection uri

       xml    XML document used with the define command.

EXAMPLES
       # a playbook task line:
       - virt: name=alpha state=running

       # /usr/bin/ansible invocations
       ansible host -m virt -a "name=alpha command=status"
       ansible host -m virt -a "name=alpha command=get_xml"
       ansible host -m virt -a "name=alpha command=create uri=lxc:///"

       # a playbook example of defining and launching an LXC guest
       tasks:
         - name: define vm
           virt: name=foo
                 command=define
                 xml="{{ lookup('template', 'container-template.xml.j2') }}"
                 uri=lxc:///
         - name: start vm
           virt: name=foo state=running uri=lxc:///



AUTHOR
       Michael DeHaan, Seth Vidal

SEE ALSO
       ansible(1), http://ansible.github.com/modules.html#virt



1.4.5                             2014-02-12                   ANSIBLE.VIRT(3)
