File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change 47
47
when : item.stat.exists
48
48
when : libvirt_vm_engine == 'kvm'
49
49
50
+ - block :
51
+ - name : Detect the QEMU emulator binary path
52
+ stat :
53
+ path : /usr/libexec/qemu-kvm
54
+ register : kvm_emulator_result
55
+
56
+ - name : Set a fact containing the QEMU emulator binary path
57
+ set_fact :
58
+ libvirt_vm_emulator : " {{ kvm_emulator_result.stat.path }}"
59
+ when : kvm_emulator_result.stat.exists
60
+ when :
61
+ - libvirt_vm_engine == 'qemu'
62
+ - ansible_os_family == 'RedHat'
63
+ - ansible_distribution_major_version | int >= 8
64
+
50
65
- block :
51
66
- name : Detect the QEMU emulator binary path
52
67
shell : which qemu-system-{{ libvirt_vm_arch }}
56
71
- name : Set a fact containing the QEMU emulator binary path
57
72
set_fact :
58
73
libvirt_vm_emulator : " {{ qemu_emulator_result.stdout }}"
59
- when : libvirt_vm_engine == 'qemu'
74
+
75
+ when :
76
+ - libvirt_vm_engine == 'qemu'
77
+ - ansible_os_family != 'RedHat' or ansible_distribution_major_version | int == 7
60
78
61
79
- name : Fail if unable to detect the emulator
62
80
fail :
Original file line number Diff line number Diff line change 29
29
console_log_path : >-
30
30
{{ vm.console_log_path |
31
31
default(libvirt_vm_default_console_log_dir + '/' + vm.name + '-console.log', true) }}
32
- machine_default : " {{ none if libvirt_vm_engine == 'kvm' else 'pc-1.0 ' }}"
32
+ machine_default : " {{ none if libvirt_vm_engine == 'kvm' else 'pc' }}"
33
33
machine : " {{ vm.machine | default(machine_default, true) }}"
34
34
cpu_mode : " {{ vm.cpu_mode | default(libvirt_cpu_mode_default) }}"
35
35
volumes : " {{ vm.volumes | default([], true) }}"
You can’t perform that action at this time.
0 commit comments