From 7ef534761f075ad46169317b2603193dc47cfb74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Tue, 14 May 2024 09:11:32 +0200 Subject: [PATCH] ansible: install Python 3.9 on RHEL 8 Fixes: https://github.com/nodejs/build/issues/3718 --- .../roles/baselayout/tasks/partials/repo/rhel8.yml | 12 ++++++++++++ .../build-test-v8/tasks/partials/rhel8-ppc64.yml | 9 +-------- .../build-test-v8/tasks/partials/rhel8-s390x.yml | 9 +-------- .../roles/build-test-v8/tasks/partials/rhel8-x64.yml | 9 +-------- 4 files changed, 15 insertions(+), 24 deletions(-) diff --git a/ansible/roles/baselayout/tasks/partials/repo/rhel8.yml b/ansible/roles/baselayout/tasks/partials/repo/rhel8.yml index 094696678..cebd56342 100644 --- a/ansible/roles/baselayout/tasks/partials/repo/rhel8.yml +++ b/ansible/roles/baselayout/tasks/partials/repo/rhel8.yml @@ -12,3 +12,15 @@ ansible.builtin.dnf: name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm state: present + +- name: install Python 3.9 + ansible.builtin.dnf: + name: ['python39'] + state: present + notify: package updated + +- name: update python3 package alternatives + community.general.alternatives: + link: /usr/bin/python3 + name: python3 + path: /usr/bin/python3.9 diff --git a/ansible/roles/build-test-v8/tasks/partials/rhel8-ppc64.yml b/ansible/roles/build-test-v8/tasks/partials/rhel8-ppc64.yml index bc49dc1eb..f5cca303f 100644 --- a/ansible/roles/build-test-v8/tasks/partials/rhel8-ppc64.yml +++ b/ansible/roles/build-test-v8/tasks/partials/rhel8-ppc64.yml @@ -5,10 +5,9 @@ # # V8 builds still require Python 2. -# Newer V8 builds require Python 3.8, or later. - name: install packages required to build V8 ansible.builtin.dnf: - name: ['glib2-devel', 'python2', 'python2-pip', 'python39'] + name: ['glib2-devel', 'python2', 'python2-pip'] state: present notify: package updated @@ -18,12 +17,6 @@ name: python path: /usr/bin/python2 -- name: update python3 package alternatives - community.general.alternatives: - link: /usr/bin/python3 - name: python3 - path: /usr/bin/python3.9 - - name: install dependencies for V8 build tools (Python 2) ansible.builtin.pip: executable: pip2 diff --git a/ansible/roles/build-test-v8/tasks/partials/rhel8-s390x.yml b/ansible/roles/build-test-v8/tasks/partials/rhel8-s390x.yml index 60937ae47..03c52cbd5 100644 --- a/ansible/roles/build-test-v8/tasks/partials/rhel8-s390x.yml +++ b/ansible/roles/build-test-v8/tasks/partials/rhel8-s390x.yml @@ -5,10 +5,9 @@ # # Older V8 builds still require Python 2. -# Newer V8 builds require Python 3.8, or later. - name: install packages required to build V8 ansible.builtin.dnf: - name: ['GConf2-devel', 'python2', 'python2-pip', 'python39', 'patch'] + name: ['GConf2-devel', 'python2', 'python2-pip', 'patch'] state: present notify: package updated @@ -18,12 +17,6 @@ name: python path: /usr/bin/python2 -- name: update python3 package alternatives - community.general.alternatives: - link: /usr/bin/python3 - name: python3 - path: /usr/bin/python3.9 - - name: install dependencies for V8 build tools (Python 2) ansible.builtin.pip: executable: pip2 diff --git a/ansible/roles/build-test-v8/tasks/partials/rhel8-x64.yml b/ansible/roles/build-test-v8/tasks/partials/rhel8-x64.yml index 834047d8f..a13e29ddf 100644 --- a/ansible/roles/build-test-v8/tasks/partials/rhel8-x64.yml +++ b/ansible/roles/build-test-v8/tasks/partials/rhel8-x64.yml @@ -11,10 +11,9 @@ state: enabled # V8 builds still require Python 2. -# Newer V8 builds require Python 3.8, or later. - name: install packages required to build V8 ansible.builtin.dnf: - name: ['ninja-build', 'python2', 'python2-pip', 'python39'] + name: ['ninja-build', 'python2', 'python2-pip'] state: present notify: package updated @@ -24,12 +23,6 @@ name: python path: /usr/bin/python2 -- name: update python3 package alternatives - community.general.alternatives: - link: /usr/bin/python3 - name: python3 - path: /usr/bin/python3.9 - - name: install dependencies for V8 build tools (Python 2) ansible.builtin.pip: executable: pip2