fix: Use python3 instead of hardcoded python3.10 64/73864/1
authorAnil Belur <abelur@linuxfoundation.org>
Thu, 6 Nov 2025 22:39:23 +0000 (08:39 +1000)
committerAnil Belur <abelur@linuxfoundation.org>
Thu, 6 Nov 2025 23:34:22 +0000 (09:34 +1000)
Replace hardcoded python3.10 with python3 to support systems
that don't have Python 3.10 installed (e.g., Ubuntu 24.04 which
ships with Python 3.12).

This change maintains backward compatibility while enabling
builds on newer systems. Ansible 9.2.0 supports Python 3.8+,
so any python3 version will work.

Fixes: ansible-galaxy.sh failing on Ubuntu 24.04
Related: Python version fallback in global-jjb lf-env.sh

Change-Id: Ib18cf879a498a1504ff9dd25fb620ca18a0e0ed1
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
ansible-galaxy.sh
releasenotes/notes/ubuntu-24-04-python-support-549cc5f28b6aa26c.yaml [new file with mode: 0644]

index 6ee9589..1872730 100755 (executable)
@@ -19,7 +19,7 @@ wget -q https://raw.githubusercontent.com/lfit/releng-global-jjb/master/jenkins-
 # shellcheck disable=SC1090
 . ~/lf-env.sh
 
-lf-activate-venv --python python3.10 --venv-file "/tmp/.ansible_venv" \
+lf-activate-venv --python python3 --venv-file "/tmp/.ansible_venv" \
     ansible~=9.2.0
 
 ansible_roles_path=${1:-.galaxy}
diff --git a/releasenotes/notes/ubuntu-24-04-python-support-549cc5f28b6aa26c.yaml b/releasenotes/notes/ubuntu-24-04-python-support-549cc5f28b6aa26c.yaml
new file mode 100644 (file)
index 0000000..2f61460
--- /dev/null
@@ -0,0 +1,6 @@
+---
+fixes:
+  - |
+    Fixed ansible-galaxy.sh script failing on Ubuntu 24.04 with error
+    ``python3.10: command not found``. The script now uses the system's
+    default Python 3 instead of requiring a specific version.