diff --git a/playbooks/include/deploy-kvm-guest.yml b/playbooks/include/deploy-kvm-guest.yml index 0c02ea6..9f87ee1 100644 --- a/playbooks/include/deploy-kvm-guest.yml +++ b/playbooks/include/deploy-kvm-guest.yml @@ -34,13 +34,6 @@ {% endif %} {% endfor %} - virt_install_passthrough: >- - {% if passthrough_devices is defined %} - {% for item in passthrough_devices %} - --hostdev {{ item }} - {% endfor %} - {% endif %} - tasks: - name: get vm list @@ -86,8 +79,7 @@ command: > virt-install --name {{ inventory_hostname }} \ --graphics none --boot useserial=on --noautoconsole \ - --serial pty,log.file={{ console_log }} \ - --controller usb,model=none --sound none \ + --serial pty,log.file={{ console_log }} --sound none \ --vcpus "sockets=1,cores={{ num_cpus }},threads=1,placement=auto" \ --memory {{ mem_size }} --cpu host-passthrough \ --disk {{ os_disk_image }},{{ dsk_opts }},size={{ dsk_size }} \ @@ -101,9 +93,10 @@ {% for dev in virt_install_devices -%} --hostdev {{ dev }} \ {% endfor -%} + {% else -%} + --controller usb,model=none \ {% endif -%} {{ virt_install_disks }} \ - {{ virt_install_passthrough }} \ {{ virt_install_network }} \ {{ virt_install_os_args }} delegate_to: "{{ vmhost }}"