File tree Expand file tree Collapse file tree 4 files changed +14
-4
lines changed Expand file tree Collapse file tree 4 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,10 @@ init system when libvirtd is started - quotes will be added
7272an explicit connection URI will not be set when calling virsh or any of
7373the virt_ ansible modules.
7474
75+ ` libvirt_host_python3 ` : Whether the python3 version of the libvirt python
76+ bindings should be installed. If ` false ` , the python 2 bindings will be
77+ installed.
78+
7579Dependencies
7680------------
7781
Original file line number Diff line number Diff line change @@ -61,3 +61,9 @@ libvirt_host_uri: >-
6161 {%- if libvirt_host_socket_dir -%}
6262 qemu+unix:///system?socket={{ libvirt_host_socket_dir }}/libvirt-sock
6363 {%- endif %}
64+
65+ # Whether the python3 version of the libvirt python bindings should be
66+ # 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 | basename is match('python3.*') }}
Original file line number Diff line number Diff line change 22# List of package dependencies common to all Debian distributions
33libvirt_host_libvirt_packages_common :
44 - qemu-kvm
5- - python-libvirt
6- - python-lxml
5+ - " {{ 'python3-libvirt' if libvirt_host_python3 | bool else ' python-libvirt' }} "
6+ - " {{ 'python3-lxml' if libvirt_host_python3 | bool else ' python-lxml' }} "
77
88# Package that contains the libvirt daemon
99libvirt_host_libvirt_packages_libvirt_daemon : >-
Original file line number Diff line number Diff line change 33libvirt_host_libvirt_packages_default :
44 - libvirt
55 - libvirt-daemon-kvm
6- - " {{ 'python3-libvirt' if ansible_distribution_major_version|int >=8 else 'libvirt-python' }}"
7- - " {{ 'python3-lxml' if ansible_distribution_major_version|int >=8 else 'python-lxml' }}"
6+ - " {{ 'python3-libvirt' if libvirt_host_python3 | bool else 'libvirt-python' }}"
7+ - " {{ 'python3-lxml' if libvirt_host_python3 | bool else 'python-lxml' }}"
88 - qemu-kvm
99
1010# Packages that are only necessary if you require EFI support
You can’t perform that action at this time.
0 commit comments