File tree 6 files changed +14
-14
lines changed
6 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ libvirt_host_uri: >-
66
66
67
67
# Whether the python3 version of the libvirt python bindings should be
68
68
# installed. If false, the python 2 bindings will be installed.
69
- libvirt_host_python3 : " {{ ansible_python .version.major == 3 }}"
69
+ libvirt_host_python3 : " {{ ansible_facts.python .version.major == 3 }}"
70
70
71
71
# Whether to install and enable the libvirt daemon.
72
72
libvirt_host_install_daemon : true
Original file line number Diff line number Diff line change 31
31
retries : 3
32
32
become : True
33
33
when :
34
- - ansible_os_family == "RedHat"
34
+ - ansible_facts.os_family == "RedHat"
35
35
- libvirt_host_qemu_emulators | length > 0
36
36
37
37
- name : Ensure QEMU emulator packages are installed
40
40
state : present
41
41
loop : " {{ libvirt_host_qemu_emulators | flatten(levels=1) }}"
42
42
# NOTE(mgoddard): CentOS 8 does not provide separate packages per-emulator.
43
- when : ansible_os_family != "RedHat" or ansible_distribution_major_version | int == 7
43
+ when : ansible_facts.os_family != "RedHat" or ansible_facts.distribution_major_version | int == 7
44
44
register : result
45
45
until : result is success
46
46
retries : 3
Original file line number Diff line number Diff line change 11
11
include : " {{ post_install_path }}"
12
12
with_first_found :
13
13
- files :
14
- - post-install-{{ ansible_distribution }}.yml
15
- - post-install-{{ ansible_os_family }}.yml
14
+ - post-install-{{ ansible_facts.distribution }}.yml
15
+ - post-install-{{ ansible_facts.os_family }}.yml
16
16
skip : true
17
17
loop_control :
18
18
loop_var : post_install_path
Original file line number Diff line number Diff line change 34
34
become : true
35
35
when :
36
36
- libvirt_host_install_daemon | bool
37
- - ansible_apparmor .status | default == 'enabled'
37
+ - ansible_facts.apparmor .status | default == 'enabled'
38
38
- item.type == "dir"
39
39
loop : " {{ libvirt_host_pools | flatten(levels=1) }}"
40
40
notify :
Original file line number Diff line number Diff line change 4
4
- name : gather os specific variables
5
5
include_vars : " {{ item }}"
6
6
with_first_found :
7
- - " {{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml"
8
- - " {{ ansible_distribution }}.yml"
9
- - " {{ ansible_os_family }}.yml"
7
+ - " {{ ansible_facts.distribution }}-{{ ansible_facts.distribution_major_version }}.yml"
8
+ - " {{ ansible_facts.distribution }}.yml"
9
+ - " {{ ansible_facts.os_family }}.yml"
10
10
tags : vars
Original file line number Diff line number Diff line change @@ -6,12 +6,12 @@ libvirt_host_libvirt_packages_common:
6
6
# List of all daemon packages to install.
7
7
libvirt_host_libvirt_packages_libvirt_daemon :
8
8
# The apparmor package contains the apparmor_parser tool.
9
- - " {% if ansible_apparmor .status| default == 'enabled' %}apparmor{% endif %}"
9
+ - " {% if ansible_facts.apparmor .status| default == 'enabled' %}apparmor{% endif %}"
10
10
- >-
11
- {%- if (ansible_distribution == "Ubuntu" and
12
- ansible_distribution_major_version is version_compare('16.04', '<')) or
13
- (ansible_distribution == "Debian" and
14
- ansible_distribution_major_version is version_compare('8', '<')) -%}
11
+ {%- if (ansible_facts.distribution == "Ubuntu" and
12
+ ansible_facts.distribution_major_version is version_compare('16.04', '<')) or
13
+ (ansible_facts.distribution == "Debian" and
14
+ ansible_facts.distribution_major_version is version_compare('8', '<')) -%}
15
15
libvirt-bin
16
16
{%- else -%}
17
17
libvirt-daemon-system
You can’t perform that action at this time.
0 commit comments