Chore: Update pyenv python versions to more recent 25/73225/1
authorAnil Belur <abelur@linuxfoundation.org>
Thu, 3 Oct 2024 22:32:14 +0000 (08:32 +1000)
committerAnil Belur <abelur@linuxfoundation.org>
Thu, 3 Oct 2024 22:34:34 +0000 (08:34 +1000)
Add python 3.12.x to the list

Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Change-Id: I51bb25d9db70b61fbd99c2436cb78bd5bf1f2c52

defaults/main.yml
tasks/main.yml

index 68460c1..b2c9d9d 100644 (file)
@@ -1,9 +1,10 @@
 ---
-pyenv_version: v2.3.35
-python39_version: 3.9.13
-python38_version: 3.8.13
-python310_version: 3.10.13
-python311_version: 3.11.7
+pyenv_version: v2.4.13
+python38_version: 3.8.20
+python39_version: 3.9.20
+python310_version: 3.10.15
+python311_version: 3.11.10
+python312_version: 3.12.6
 
 python_versions:
   - '{{ python39_version }}'
index 780522a..6485451 100644 (file)
@@ -57,6 +57,7 @@
     PYTHON39_VERSION: '{{ python39_version }}'
     PYTHON310_VERSION: '{{ python310_version }}'
     PYTHON311_VERSION: '{{ python311_version }}'
+    PYTHON312_VERSION: '{{ python312_version }}'
   block:
     - name: 'Install pyenv {{ pyenv_version }}'
       ansible.builtin.git:
@@ -81,5 +82,9 @@
       when:
         - (ansible_distribution == 'Ubuntu' and ansible_distribution_version >= '18.04') or
           (ansible_distribution == 'CentOS' and ansible_distribution_major_version >= '8')
-    - name: 'Set the required python 3.x versions using pyenv'  # noqa no-changed-when
+    - name: 'Set the required python 3.x versions using pyenv on Ubuntu'  # noqa no-changed-when
+      ansible.builtin.command: 'pyenv global system {{ pyenv_cmd }}'
+      when: ansible_distribution == 'Ubuntu'
+    - name: 'Set the required python 3.x versions using pyenv on CentOS'  # noqa no-changed-when
       ansible.builtin.command: 'pyenv global {{ pyenv_cmd }}'
+      when: ansible_distribution == 'CentOS'