From 0b2533143f1b564057c7b4cd71c0195bc89da898 Mon Sep 17 00:00:00 2001
From: Max Gautier <mg@max.gautier.name>
Date: Tue, 14 May 2024 02:51:11 +0000
Subject: [PATCH] Don't force python interpreter on ubuntu (#11183)

This allows local override in tasks for using virtualenvs.
---
 tests/scripts/testcases_run.sh | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/tests/scripts/testcases_run.sh b/tests/scripts/testcases_run.sh
index ec22a4dcb..a1c09be66 100755
--- a/tests/scripts/testcases_run.sh
+++ b/tests/scripts/testcases_run.sh
@@ -2,7 +2,6 @@
 set -euxo pipefail
 
 echo "CI_JOB_NAME is $CI_JOB_NAME"
-CI_TEST_ADDITIONAL_VARS=""
 
 if [[ "$CI_JOB_NAME" =~ "upgrade" ]]; then
   if [ "${UPGRADE_TEST}" == "false" ]; then
@@ -42,11 +41,6 @@ if [[ "$CI_JOB_NAME" =~ "opensuse" ]]; then
   ansible all -m raw -a 'zypper --gpg-auto-import-keys refresh'
 fi
 
-if [[ "$CI_JOB_NAME" =~ "ubuntu" ]]; then
-  # We need to tell ansible that ubuntu hosts are python3 only
-  CI_TEST_ADDITIONAL_VARS="-e ansible_python_interpreter=/usr/bin/python3"
-fi
-
 # Check out latest tag if testing upgrade
 test "${UPGRADE_TEST}" != "false" && git fetch --all && git checkout "$KUBESPRAY_VERSION"
 # Checkout the CI vars file so it is available
@@ -63,7 +57,7 @@ ansible-playbook --limit "all:!fake_hosts" \
      $ANSIBLE_LOG_LEVEL \
     -e @${CI_TEST_SETTING} \
     -e @${CI_TEST_REGISTRY_MIRROR} \
-    -e @${CI_TEST_VARS} ${CI_TEST_ADDITIONAL_VARS} \
+    -e @${CI_TEST_VARS} \
     -e local_release_dir=${PWD}/downloads \
     "$@" \
     ${playbook}
-- 
GitLab