community.libvirt.libvirt_qemu connection – Run tasks on libvirt/qemu virtual machines
Note
This connection plugin is part of the community.libvirt collection (version 2.0.0).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.libvirt
.
You need further requirements to be able to use this connection plugin,
see Requirements for details.
To use it in a playbook, specify: community.libvirt.libvirt_qemu
.
New in community.libvirt 2.10.0
Synopsis
Run commands or put/fetch files to libvirt/qemu virtual machines using the qemu agent API.
Requirements
The below requirements are needed on the local controller node that executes this connection.
python >= 2.6
libvirt python bindings
lxml
Parameters
Parameter |
Comments |
---|---|
Shell to use for execution inside container. Set this to ‘cmd’ or ‘powershell’ for Windows VMs. Default: Configuration:
|
|
Virtual machine name. Default: Configuration:
|
|
Libvirt URI to connect to to access the virtual machine. Default: Configuration:
|
Note
Configuration entries listed above for each entry type (Ansible variable, environment variable, and so on) have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. The entry types are also ordered by precedence from low to high priority order. For example, an ansible.cfg entry (further up in the list) is overwritten by an Ansible variable (further down in the list).
Notes
Note
Currently DOES NOT work with selinux set to enforcing in the VM.
Requires the qemu-agent installed in the VM.
Requires access to the qemu-ga commands guest-exec, guest-exec-status, guest-file-close, guest-file-open, guest-file-read, guest-file-write.