From nobody Wed May 1 13:54:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1578412335; cv=none; d=zohomail.com; s=zohoarc; b=asbbdj6chegNhEWWPS8IMuEiQdwQmkjKDCVNHznZWadzWUgLgRV+zwSkRqxl/Jt8vA/i6gAw9kwGZgKNbWeEWFTgvxQrp5wFJUlvLY4x+iQVt63j70nWYaT6mMaqTL89BuRaMeD1p8OKnxpDDpNTKx0xFWEYIqbEnFN+HR+NrzY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578412335; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=NaqTNXkrgK9CLHHPqWW0mIbEUEL3AHSmm6FTF0ve8ek=; b=njfOIfK12ltcLDMFpdzcSubAy+irC9h4sb/ldW5T8OY8zxmqShbSjkkPGT+YweTu99B0JM8BeFygionmxvaILo2IuJ4bypmhzxT/VR0itdTXdflEv0AD7AqGmprULFXFpmBs0ggeTqoMEbo0BQvIYZNHxJcOZhKNyoEllq2sqUQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1578412335259271.6829026398865; Tue, 7 Jan 2020 07:52:15 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-253-UDdwORSuOhqdMgZt1JqzWw-1; Tue, 07 Jan 2020 10:50:51 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2E90ADBF3; Tue, 7 Jan 2020 15:50:43 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 06AB981C0B; Tue, 7 Jan 2020 15:50:43 +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 B45F718089D0; Tue, 7 Jan 2020 15:50:42 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 007FoRMU005754 for ; Tue, 7 Jan 2020 10:50:27 -0500 Received: by smtp.corp.redhat.com (Postfix) id A5AC25D9E1; Tue, 7 Jan 2020 15:50:27 +0000 (UTC) Received: from kinshicho.usersys.redhat.com (unknown [10.43.2.246]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2E3255D9CA for ; Tue, 7 Jan 2020 15:50:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578412334; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=NaqTNXkrgK9CLHHPqWW0mIbEUEL3AHSmm6FTF0ve8ek=; b=DmQkYBeJhCcM8n4ci3tzfLyiPElhAAouKBb7qNKiOcol97jPwdHlKuw/PNV0BJyQpf9fFQ 0WVDoPnqtlEST5TeCFF6ZI1PEzAzDarS/MS+/5RNhyxzsWZeG4iWp4hiL0tfTkZbeC6MR8 yi7WB5CXXqAuO4GfhFuUGIuWcGKqcps= From: Andrea Bolognani To: libvir-list@redhat.com Date: Tue, 7 Jan 2020 16:50:18 +0100 Message-Id: <20200107155020.22439-2-abologna@redhat.com> In-Reply-To: <20200107155020.22439-1-abologna@redhat.com> References: <20200107155020.22439-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [jenkins-ci PATCH 1/3] lcitool: Rename temp -> resolved 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-MC-Unique: UDdwORSuOhqdMgZt1JqzWw-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Since we're using the dictionary to resolve the mappings for the specific target OS, this is a much more suitable name. Signed-off-by: Andrea Bolognani Reviewed-by: Daniel P. Berrang=C3=A9 --- guests/playbooks/update/tasks/packages.yml | 46 +++++++++++----------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/guests/playbooks/update/tasks/packages.yml b/guests/playbooks/= update/tasks/packages.yml index bd55e34..116c46d 100644 --- a/guests/playbooks/update/tasks/packages.yml +++ b/guests/playbooks/update/tasks/packages.yml @@ -10,7 +10,7 @@ file: '{{ base }}/vars/projects/{{ project }}.yml' =20 - set_fact: - temp: {} + resolved: {} =20 - name: '{{ project }}: Verify mappings' fail: @@ -22,7 +22,7 @@ =20 - name: '{{ project }}: Look up mappings (default)' set_fact: - temp: '{{ temp|combine({ item: mappings[item]["default"] }) }}' + resolved: '{{ resolved|combine({ item: mappings[item]["default"] }) }}' with_items: '{{ packages }}' when: @@ -30,7 +30,7 @@ =20 - name: '{{ project }}: Look up mappings (package format)' set_fact: - temp: '{{ temp|combine({ item: mappings[item][package_format] }) }}' + resolved: '{{ resolved|combine({ item: mappings[item][package_format] = }) }}' with_items: '{{ packages }}' when: @@ -38,7 +38,7 @@ =20 - name: '{{ project }}: Look up mappings (OS name)' set_fact: - temp: '{{ temp|combine({ item: mappings[item][os_name] }) }}' + resolved: '{{ resolved|combine({ item: mappings[item][os_name] }) }}' with_items: '{{ packages }}' when: @@ -46,7 +46,7 @@ =20 - name: '{{ project }}: Look up mappings (OS version)' set_fact: - temp: '{{ temp|combine({ item: mappings[item][os_name + os_version] })= }}' + resolved: '{{ resolved|combine({ item: mappings[item][os_name + os_ver= sion] }) }}' with_items: '{{ packages }}' when: @@ -54,7 +54,7 @@ =20 - name: '{{ project }}: Look up mappings (arch with default)' set_fact: - temp: '{{ temp|combine({ item: mappings[item]["x86_64" + "-" + "defaul= t"] }) }}' + resolved: '{{ resolved|combine({ item: mappings[item]["x86_64" + "-" += "default"] }) }}' with_items: '{{ packages }}' when: @@ -62,7 +62,7 @@ =20 - name: '{{ project }}: Look up mappings (arch with package format)' set_fact: - temp: '{{ temp|combine({ item: mappings[item]["x86_64" + "-" + package= _format] }) }}' + resolved: '{{ resolved|combine({ item: mappings[item]["x86_64" + "-" += package_format] }) }}' with_items: '{{ packages }}' when: @@ -70,7 +70,7 @@ =20 - name: '{{ project }}: Look up mappings (arch with OS name)' set_fact: - temp: '{{ temp|combine({ item: mappings[item]["x86_64" + "-" + os_name= ] }) }}' + resolved: '{{ resolved|combine({ item: mappings[item]["x86_64" + "-" += os_name] }) }}' with_items: '{{ packages }}' when: @@ -78,7 +78,7 @@ =20 - name: '{{ project }}: Look up mappings (arch with OS version)' set_fact: - temp: '{{ temp|combine({ item: mappings[item]["x86_64" + "-" + os_name= + os_version] }) }}' + resolved: '{{ resolved|combine({ item: mappings[item]["x86_64" + "-" += os_name + os_version] }) }}' with_items: '{{ packages }}' when: @@ -89,12 +89,12 @@ =20 - name: '{{ project }}: Flatten package list' set_fact: - flattened: '{{ flattened }} + [ "{{ temp[item] }}" ]' + flattened: '{{ flattened }} + [ "{{ resolved[item] }}" ]' with_items: - '{{ temp }}' + '{{ resolved }}' when: - - temp[item] !=3D None - - temp[item] not in flattened + - resolved[item] !=3D None + - resolved[item] not in flattened =20 - name: '{{ project }}: Install/remove packages (state=3D{{ state }})' package: @@ -102,7 +102,7 @@ state: '{{ state }}' =20 - set_fact: - pip_temp: {} + pip_resolved: {} =20 - name: '{{ project }}: Verify pip mappings' fail: @@ -115,7 +115,7 @@ =20 - name: '{{ project }}: Look up pip mappings (default)' set_fact: - pip_temp: '{{ pip_temp|combine({ item: pip_mappings[item]["default"] }= ) }}' + pip_resolved: '{{ pip_resolved|combine({ item: pip_mappings[item]["def= ault"] }) }}' with_items: '{{ packages }}' when: @@ -126,12 +126,12 @@ =20 - name: '{{ project }}: Flatten pip package list' set_fact: - pip_flattened: '{{ pip_flattened }} + [ "{{ pip_temp[item] }}" ]' + pip_flattened: '{{ pip_flattened }} + [ "{{ pip_resolved[item] }}" ]' with_items: - '{{ pip_temp }}' + '{{ pip_resolved }}' when: - - pip_temp[item] !=3D None - - pip_temp[item] not in pip_flattened + - pip_resolved[item] !=3D None + - pip_resolved[item] not in pip_flattened =20 - name: '{{ project }}: Install packages from pip (state=3D{{ state }})' pip: @@ -141,7 +141,7 @@ with_items: '{{ packages }}' when: - - temp[item] is defined - - temp[item] =3D=3D None - - pip_temp[item] is defined - - pip_temp[item] !=3D None + - resolved[item] is defined + - resolved[item] =3D=3D None + - pip_resolved[item] is defined + - pip_resolved[item] !=3D None --=20 2.24.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 1 13:54:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1578412257; cv=none; d=zohomail.com; s=zohoarc; b=SVrhMoEKm5y1abZpnnZ+xLA3AwyQFCbrBRlgzPa2iciIeeEo5hLBfK7DbGBkPNu3HV/Jzln+MQLgiNDzMH4gkkvSZf5Zyeh2UKQcpG1CPB6lDodyQmeeoN2jn/4bPERjEzUBMtcCv7QwivHS9GZJVxdmlyRgs/J92HSrjR9Ttwo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578412257; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=85bMhuGWn3dNycDRLdO18Z0wHDPmjPjvMDrNO8AX4qU=; b=GGH3OtxrB9PmSBAH+5F1JD1H4sNHXzSMQXt9IV8ARg/4jeKODEqXAaNBbB3rctRXkATLH4YpZqoGrNaIEuWf4LKdEAqs96HZvTgnb5N4iu/5+TqKJ1/tYrkc6TuDWsj26+BdhPP6k8Oc6DdFJDfAm5+E7JoxvY1dWadz5MLL8vw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1578412257455299.46499379522504; Tue, 7 Jan 2020 07:50:57 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-107-WLgNQm68NVCTlHisbsUqOQ-1; Tue, 07 Jan 2020 10:50:54 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8C20E803A57; Tue, 7 Jan 2020 15:50:46 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 67C135D9CA; Tue, 7 Jan 2020 15:50: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 2CEE618089D6; Tue, 7 Jan 2020 15:50:46 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 007FoSoq005763 for ; Tue, 7 Jan 2020 10:50:28 -0500 Received: by smtp.corp.redhat.com (Postfix) id 76D185D9E1; Tue, 7 Jan 2020 15:50:28 +0000 (UTC) Received: from kinshicho.usersys.redhat.com (unknown [10.43.2.246]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F3CF45D9CA for ; Tue, 7 Jan 2020 15:50:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578412256; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=85bMhuGWn3dNycDRLdO18Z0wHDPmjPjvMDrNO8AX4qU=; b=QPC+xaH4oTRqVf7Q0tIWY3BnLzE1pdsFtjPoznnq8jCAnkI8XZ3DLXBrN5HCq4gb7FZSYs /tHs/UBplW+91dm7XGvLjL4MadVLGYzN+OndHhyFVfpNouKdqV7MXmjJJJDgW8LOT5HE3v oTKclCzqpXJO5TLiwB0vAYJLkFOZqOM= From: Andrea Bolognani To: libvir-list@redhat.com Date: Tue, 7 Jan 2020 16:50:19 +0100 Message-Id: <20200107155020.22439-3-abologna@redhat.com> In-Reply-To: <20200107155020.22439-1-abologna@redhat.com> References: <20200107155020.22439-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [jenkins-ci PATCH 2/3] lcitool: Fix flattening of pip mappings 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: WLgNQm68NVCTlHisbsUqOQ-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Right now we're looping in the wrong place: instead of unconditionally adding to the flattened list of pip packages and then calling pip multiple times with that same list, we should conditionally add items to the flattened list and then call pip a single time with the result. Signed-off-by: Andrea Bolognani Reviewed-by: Daniel P. Berrang=C3=A9 --- guests/playbooks/update/tasks/packages.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/guests/playbooks/update/tasks/packages.yml b/guests/playbooks/= update/tasks/packages.yml index 116c46d..fc8a3d1 100644 --- a/guests/playbooks/update/tasks/packages.yml +++ b/guests/playbooks/update/tasks/packages.yml @@ -121,6 +121,15 @@ when: - pip_mappings[item]["default"] is defined =20 +- name: '{{ project }}: Remove unwanted pip mappings' + set_fact: + pip_resolved: '{{ pip_resolved|combine({ item: None }) }}' + with_items: + '{{ packages }}' + when: + - resolved[item] is defined + - resolved[item] !=3D None + - set_fact: pip_flattened: [] =20 @@ -138,10 +147,3 @@ name: '{{ pip_flattened|sort }}' executable: pip3 state: '{{ state }}' - with_items: - '{{ packages }}' - when: - - resolved[item] is defined - - resolved[item] =3D=3D None - - pip_resolved[item] is defined - - pip_resolved[item] !=3D None --=20 2.24.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 1 13:54:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1578412243; cv=none; d=zohomail.com; s=zohoarc; b=BnmvWmoOBQcL9tN5M/3nlpAcCXTt3PPDsZ31b04uW/QMId1mhkFzLUMdjrW7r2eKRYfsf6zCRP2WKn8jPv84uM/fDueunkGfxC99idAXcmpmzoZZkBUsTdWUbmQeoh8XKT1u2WQAmbG6NRWCYvX3/uQcA8pV5r+9n12Tfr5+6iQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578412243; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=XCo3uGsQSpOs5Ow/HY1ADQmbCpsLxB1Pfzis09F2JG4=; b=AvE6PCWTnP4M02nDbuBTpbddfJYc0BzV2lst1j1U0EOeCbpp+juwhY8TdMmM5RqLK3WqoLhE2/bjlFoakSlGduFDjKAmc+j0Y6vC3yL3nd+GuRuAOl1Q6hdGvSH7/i/EWcOzm8raztkv/v3KpAFttCEEyAYBklw9/tIqfrg7BNY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 157841224342017.89038010993761; Tue, 7 Jan 2020 07:50:43 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-427-QUzPA14nP_-C7NcwCAzBLQ-1; Tue, 07 Jan 2020 10:50:40 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6575618CA27B; Tue, 7 Jan 2020 15:50:33 +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 108B65D9CA; Tue, 7 Jan 2020 15:50:33 +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 E112E81C60; Tue, 7 Jan 2020 15:50:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 007FoTQ6005775 for ; Tue, 7 Jan 2020 10:50:29 -0500 Received: by smtp.corp.redhat.com (Postfix) id 481095D9E1; Tue, 7 Jan 2020 15:50:29 +0000 (UTC) Received: from kinshicho.usersys.redhat.com (unknown [10.43.2.246]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C44005D9CA for ; Tue, 7 Jan 2020 15:50:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578412242; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=XCo3uGsQSpOs5Ow/HY1ADQmbCpsLxB1Pfzis09F2JG4=; b=gyMoPjP/khw3TUy1HZ3XUGrfxBZlSQkwaUm+Ab6oVrq+kK6T0mhr46fV2ZYKBiYDGdr+fJ TiDyhQMl2eJHzSTZxs5lzNJckYlVEyieWHtWISAm9WILPdmnLbXxZVrN1vKDIF4zc/BYwr S3f8F6yyOsElM9PZURP2xtkvLJiNSc4= From: Andrea Bolognani To: libvir-list@redhat.com Date: Tue, 7 Jan 2020 16:50:20 +0100 Message-Id: <20200107155020.22439-4-abologna@redhat.com> In-Reply-To: <20200107155020.22439-1-abologna@redhat.com> References: <20200107155020.22439-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [jenkins-ci PATCH 3/3] lcitool: Fix pip use on CentOS 7 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: QUzPA14nP_-C7NcwCAzBLQ-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The 'pip' Ansible module doesn't work correctly when there is a mismatch between the Python version we're adding packages to and the one used to run Ansible itself: this is the case on CentOS 7, where we have Python 3 for the former but Python 2 for the latter. Call pip3 manually using the 'command' module instead to work around this issue. Signed-off-by: Andrea Bolognani Reviewed-by: Daniel P. Berrang=C3=A9 --- guests/playbooks/update/tasks/packages.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/guests/playbooks/update/tasks/packages.yml b/guests/playbooks/= update/tasks/packages.yml index fc8a3d1..4e7d5f6 100644 --- a/guests/playbooks/update/tasks/packages.yml +++ b/guests/playbooks/update/tasks/packages.yml @@ -143,7 +143,8 @@ - pip_resolved[item] not in pip_flattened =20 - name: '{{ project }}: Install packages from pip (state=3D{{ state }})' - pip: - name: '{{ pip_flattened|sort }}' - executable: pip3 - state: '{{ state }}' + command: 'pip3 install {{ item }}' + args: + warn: no + with_items: + '{{ pip_flattened|sort }}' --=20 2.24.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list