File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 15
15
- name : Set a fact containing the virtualisation engine
16
16
set_fact :
17
17
libvirt_vm_engine : >-
18
- {%- if ansible_architecture != libvirt_vm_arch -%}
18
+ {%- if ansible_facts.architecture != libvirt_vm_arch -%}
19
19
{# Virtualisation instructions are generally available only for the host
20
20
architecture. Ideally we would test for virtualisation instructions, eg. vt-d
21
21
as it is possible that another architecture could support these even
59
59
when : kvm_emulator_result.stat.exists
60
60
when :
61
61
- libvirt_vm_engine == 'qemu'
62
- - ansible_os_family == 'RedHat'
63
- - ansible_distribution_major_version | int >= 8
62
+ - ansible_facts.os_family == 'RedHat'
63
+ - ansible_facts.distribution_major_version | int >= 8
64
64
65
65
- block :
66
66
- name : Detect the QEMU emulator binary path
74
74
75
75
when :
76
76
- libvirt_vm_engine == 'qemu'
77
- - ansible_os_family != 'RedHat' or ansible_distribution_major_version | int == 7
77
+ - ansible_facts.os_family != 'RedHat' or ansible_facts.distribution_major_version | int == 7
78
78
79
79
- name : Fail if unable to detect the emulator
80
80
fail :
Original file line number Diff line number Diff line change 3
3
include_vars : " {{ item }}"
4
4
with_first_found :
5
5
- files :
6
- - " {{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml"
7
- - " {{ ansible_distribution }}.yml"
8
- - " {{ ansible_os_family }}.yml"
6
+ - " {{ ansible_facts.distribution }}-{{ ansible_facts.distribution_major_version }}.yml"
7
+ - " {{ ansible_facts.distribution }}.yml"
8
+ - " {{ ansible_facts.os_family }}.yml"
9
9
tags : vars
10
10
11
11
- include_tasks : autodetect.yml
18
18
# Libvirt requires qemu-img to create qcow2 files.
19
19
- name : Ensure qemu-img is installed
20
20
package :
21
- name : " {{ 'qemu-img' if ansible_os_family == 'RedHat' else 'qemu-utils' }}"
22
- update_cache : " {{ True if ansible_pkg_mgr == 'apt' else omit }}"
21
+ name : " {{ 'qemu-img' if ansible_facts.os_family == 'RedHat' else 'qemu-utils' }}"
22
+ update_cache : " {{ True if ansible_facts.pkg_mgr == 'apt' else omit }}"
23
23
become : true
24
24
25
25
- include_tasks : volumes.yml
You can’t perform that action at this time.
0 commit comments