[ensure-python] Improve check for CentOS/RHEL 9 packages

The value of python_version is float by default.
The existing comparison will only work for strings.
This commit changes it to work in both cases.

Change-Id: Ib13c33f38b611a38525d2803474b4ae1e05413f7
This commit is contained in:
Szymon Datko 2022-03-02 13:14:15 +00:00
parent 272f091cf9
commit fab437bbfe

View File

@ -32,7 +32,7 @@
rpm_python_pkg_name: python3-devel
when:
- ansible_distribution_major_version == '9'
- python_version == '3.9'
- python_version|string == '3.9'
- name: Install RPM package
package:
name: "{{ rpm_python_pkg_name }}"