Skip to content

Commit 4391c38

Browse files
committed
Add a default for ansible_python_interpreter
This special variable may be defined by the user, and is not always set. This change defaults to use python2 outside of CentOS/RHEL8 when ansible_python_interpreter is not set.
1 parent cbac32d commit 4391c38

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,4 @@ libvirt_host_uri: >-
6666
# installed. If false, the python 2 bindings will be installed.
6767
libvirt_host_python3: >-
6868
{{ (ansible_os_family == 'RedHat' and ansible_distribution_major_version|int >= 8) or
69-
ansible_python_interpreter | basename is match('python3.*') }}
69+
ansible_python_interpreter | default('python') | basename is match('python3.*') }}

0 commit comments

Comments
 (0)