community.libvirt.libvirt_qemu 连接 - 在 libvirt/qemu 虚拟机上运行任务
注意
此连接插件是 community.libvirt 集合(版本 1.3.0)的一部分。
如果您正在使用 ansible
包,您可能已经安装了这个集合。 它不包含在 ansible-core
中。 要检查是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用:ansible-galaxy collection install community.libvirt
。 您需要进一步的要求才能使用此连接插件,有关详细信息,请参阅 要求。
要在 playbook 中使用它,请指定:community.libvirt.libvirt_qemu
。
community.libvirt 2.10.0 中的新增功能
概要
使用 qemu 代理 API 将命令运行或放置/获取文件到 libvirt/qemu 虚拟机。
要求
本地控制器节点上需要以下要求来执行此连接。
python >= 2.6
libvirt python 绑定
参数
参数 |
注释 |
---|---|
用于在容器内执行的 Shell。 对于 Windows VM,请将其设置为 'cmd' 或 'powershell'。 默认值: 配置
|
|
虚拟机名称。 默认值: 配置
|
|
用于连接以访问虚拟机的 Libvirt URI。 默认值: 配置
|
说明
注意
当前在 VM 中将 selinux 设置为强制执行时不起作用。
需要在 VM 中安装 qemu-agent。
需要访问 qemu-ga 命令 guest-exec、guest-exec-status、guest-file-close、guest-file-open、guest-file-read、guest-file-write。