From cbdd1a0c0353e37a90f584346d0df218703d262a Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Ollivier?= Date: Mon, 3 Mar 2025 21:22:40 +0100 Subject: [PATCH] Install ansible by pip if needed MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: I3d48e2d796b5ecbdc01fb41a3c5bf648f68fc376 Signed-off-by: Cédric Ollivier --- jjb/functest/xtesting-ci.yaml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/jjb/functest/xtesting-ci.yaml b/jjb/functest/xtesting-ci.yaml index 5e1ca472b..213cb3cc7 100644 --- a/jjb/functest/xtesting-ci.yaml +++ b/jjb/functest/xtesting-ci.yaml @@ -24,7 +24,12 @@ sudo podman ps -aq |xargs sudo podman rm || true fi sudo rm -rfv /data /tmp/xtesting* - sudo apt-get install ansible patch -y + if [ $(lsb_release -r -s |cut -d\. -f1) -ge "22" ]; then + sudo apt-get install ansible patch -y + else + sudo apt-get install patch -y + sudo pip3 install ansible + fi rm -rf ~/.ansible/roles/collivier.xtesting case {release} in stable) @@ -64,7 +69,12 @@ fi sudo rm -rfv /data /tmp/xtesting* EOF - sudo apt-get install ansible patch -y + if [ $(lsb_release -r -s |cut -d\. -f1) -ge "22" ]; then + sudo apt-get install ansible patch -y + else + sudo apt-get install patch -y + sudo pip3 install ansible + fi rm -rf ~/.ansible/roles/collivier.xtesting case {release} in stable) -- 2.16.6