Merge "[ensure-python] Fix for CentOS/RHEL 9 packages"
This commit is contained in:
@@ -23,8 +23,19 @@
|
||||
- name: Install specified version of python interpreter and development files (RPM)
|
||||
when:
|
||||
- ansible_distribution == 'CentOS' or ansible_distribution == 'RedHat'
|
||||
block:
|
||||
- name: Set default RPM package name
|
||||
set_fact:
|
||||
rpm_python_pkg_name: python{{ python_version | replace('.', '') }}-devel
|
||||
- name: Set RPM package name for CentOS/RHEL 9 and Python 3.9
|
||||
set_fact:
|
||||
rpm_python_pkg_name: python3-devel
|
||||
when:
|
||||
- ansible_distribution_major_version == '9'
|
||||
- python_version == '3.9'
|
||||
- name: Install RPM package
|
||||
package:
|
||||
name: python{{ python_version | replace('.', '') }}-devel
|
||||
name: "{{ rpm_python_pkg_name }}"
|
||||
state: present
|
||||
become: yes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user