We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 435ea81 + 6140738 commit 750252dCopy full SHA for 750252d
tasks/autodetect.yml
@@ -14,7 +14,18 @@
14
15
- name: Set a fact containing the virtualisation engine
16
set_fact:
17
- libvirt_vm_engine: "{% if stat_kvm.stat.exists %}kvm{% else %}qemu{% endif %}"
+ libvirt_vm_engine: >-
18
+ {%- if ansible_architecture != libvirt_vm_arch -%}
19
+ {# Virtualisation instructions are generally available only for the host
20
+ architecture. Ideally we would test for virtualisation instructions, eg. vt-d
21
+ as it is possible that another architecture could support these even
22
+ if the emulated cpu architecture is not the same. #}
23
+ qemu
24
+ {%- elif stat_kvm.stat.exists -%}
25
+ kvm
26
+ {%- else -%}
27
28
+ {%- endif -%}
29
when: libvirt_vm_engine is none
30
31
- name: Detect the virtualisation emulator
0 commit comments