Skip to content

Commit ed2f5d4

Browse files
committed
Use ansible_python to determine whether to use python3
The CentOS 8 / ansible_python_interpreter method is not reliable on Debian when ansible_python_interpreter is not set. Related: #24
1 parent bd200cb commit ed2f5d4

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

defaults/main.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,4 @@ libvirt_host_uri: >-
6464
6565
# Whether the python3 version of the libvirt python bindings should be
6666
# installed. If false, the python 2 bindings will be installed.
67-
libvirt_host_python3: >-
68-
{{ (ansible_os_family == 'RedHat' and ansible_distribution_major_version|int >= 8) or
69-
ansible_python_interpreter | default('python') | basename is match('python3.*') }}
67+
libvirt_host_python3: "{{ ansible_python.version.major == 3 }}"

0 commit comments

Comments
 (0)