From nobody Mon Feb 9 23:42:36 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 154538140825677.33164488142529; Fri, 21 Dec 2018 00:36:48 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 651BD8AE77; Fri, 21 Dec 2018 08:36:46 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 19AF86152F; Fri, 21 Dec 2018 08:36:46 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id B60533F600; Fri, 21 Dec 2018 08:36:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id wBL8aesX000319 for ; Fri, 21 Dec 2018 03:36:40 -0500 Received: by smtp.corp.redhat.com (Postfix) id D4ECB1823E; Fri, 21 Dec 2018 08:36:40 +0000 (UTC) Received: from kinshicho.redhat.com (ovpn-204-74.brq.redhat.com [10.40.204.74]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E3A10608E8 for ; Fri, 21 Dec 2018 08:36:39 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Fri, 21 Dec 2018 09:36:25 +0100 Message-Id: <20181221083627.21819-6-abologna@redhat.com> In-Reply-To: <20181221083627.21819-1-abologna@redhat.com> References: <20181221083627.21819-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [jenkins-ci PATCH 5/7] guests: Don't dynamically look for Python binary X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 21 Dec 2018 08:36:47 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Now that we need to point Ansible to the Python binary explicitly and we prefer Python 3 to Python 2 while doing so, we might as well just re-use the path stored in the inventory instead of looking for it dynamically. Signed-off-by: Andrea Bolognani --- guests/playbooks/update/tasks/paths.yml | 15 --------------- guests/playbooks/update/templates/bashrc.j2 | 2 +- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/guests/playbooks/update/tasks/paths.yml b/guests/playbooks/upd= ate/tasks/paths.yml index 00decc9..08717ba 100644 --- a/guests/playbooks/update/tasks/paths.yml +++ b/guests/playbooks/update/tasks/paths.yml @@ -12,8 +12,6 @@ - gmake - java - make - - python2 - - python3 - su =20 - name: 'Look for files' @@ -54,16 +52,3 @@ make: '{{ commands["make"] }}' when: - make is undefined - -# Prefer python3, fall back to python2 -- name: 'Export paths' - set_fact: - python: '{{ commands["python3"] }}' - when: - - commands["python3"] !=3D '' - -- name: 'Export paths' - set_fact: - python: '{{ commands["python2"] }}' - when: - - python is undefined diff --git a/guests/playbooks/update/templates/bashrc.j2 b/guests/playbooks= /update/templates/bashrc.j2 index f0ab23e..1f39cf2 100644 --- a/guests/playbooks/update/templates/bashrc.j2 +++ b/guests/playbooks/update/templates/bashrc.j2 @@ -1,7 +1,7 @@ export PS1=3D"[\u@\h \w]\$ " =20 export MAKE=3D"{{ make }}" -export PYTHON=3D"{{ python }}" +export PYTHON=3D"{{ ansible_python_interpreter }}" =20 export MAKEFLAGS=3D"-j{{ install_vcpus|int + 1 }}" =20 --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list