From nobody Mon Feb 9 17:35:26 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 1545381408814531.8179621861466; Fri, 21 Dec 2018 00:36:48 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5786112B9F; 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 128DD70114; 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 AA5163F6E4; 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 wBL8ab4l032655 for ; Fri, 21 Dec 2018 03:36:37 -0500 Received: by smtp.corp.redhat.com (Postfix) id DAEE118250; Fri, 21 Dec 2018 08:36:37 +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 EAC2A608E8 for ; Fri, 21 Dec 2018 08:36:36 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Fri, 21 Dec 2018 09:36:23 +0100 Message-Id: <20181221083627.21819-4-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 3/7] guests: Install Python 3 during bootstrap 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.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 21 Dec 2018 08:36:47 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Almost all our target operating systems have a version of Python 3 which is recent enough (>=3D 3.5) to be used by Ansible available. In fact, almost all of them have it pre-installed, which makes installing Python 2 in addition to it just to use Ansible, when Ansible itself would be absolutely happy running on Python 3, quite silly. Signed-off-by: Andrea Bolognani --- guests/playbooks/update/tasks/bootstrap.yml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/guests/playbooks/update/tasks/bootstrap.yml b/guests/playbooks= /update/tasks/bootstrap.yml index d7abb86..f2b40e0 100644 --- a/guests/playbooks/update/tasks/bootstrap.yml +++ b/guests/playbooks/update/tasks/bootstrap.yml @@ -4,17 +4,32 @@ when: - package_format =3D=3D 'pkg' =20 +- set_fact: + python: python3 + +- set_fact: + python: python2 + when: + - os_name =3D=3D 'CentOS' + - os_version =3D=3D '7' + +- set_fact: + python: python + when: + - os_name =3D=3D 'Debian' + - os_version =3D=3D '8' + - name: Bootstrap Ansible - raw: yum install -y python2 + raw: 'yum install -y {{ python }}' when: - package_format =3D=3D 'rpm' =20 - name: Bootstrap Ansible - raw: apt-get install -y python + raw: 'apt-get install -y {{ python }}' when: - package_format =3D=3D 'deb' =20 - name: Bootstrap Ansible - raw: pkg install -y python2 + raw: 'pkg install -y {{ python }}' when: - package_format =3D=3D 'pkg' --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list