From: Anil Belur Date: Thu, 6 Nov 2025 22:39:23 +0000 (+1000) Subject: fix: Use python3 instead of hardcoded python3.10 X-Git-Tag: v0.17.1~1 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F64%2F73864%2F1;p=releng%2Fcommon-packer.git fix: Use python3 instead of hardcoded python3.10 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 --- diff --git a/ansible-galaxy.sh b/ansible-galaxy.sh index 6ee9589..1872730 100755 --- a/ansible-galaxy.sh +++ b/ansible-galaxy.sh @@ -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 index 0000000..2f61460 --- /dev/null +++ b/releasenotes/notes/ubuntu-24-04-python-support-549cc5f28b6aa26c.yaml @@ -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.