From nobody Sat Jul 5 15:27:29 2025 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 1521634821673139.52519517060398; Wed, 21 Mar 2018 05:20:21 -0700 (PDT) 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 F2FBA2820D; Wed, 21 Mar 2018 12:20:19 +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 904603791; Wed, 21 Mar 2018 12:20:19 +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 590D5181B9FF; Wed, 21 Mar 2018 12:20:18 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2LCKH38021901 for ; Wed, 21 Mar 2018 08:20:17 -0400 Received: by smtp.corp.redhat.com (Postfix) id E7610215CDB7; Wed, 21 Mar 2018 12:20:16 +0000 (UTC) Received: from inaba.usersys.redhat.com (unknown [10.43.2.44]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8CA532166BDA for ; Wed, 21 Mar 2018 12:20:16 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Wed, 21 Mar 2018 13:19:57 +0100 Message-Id: <20180321122002.6605-1-abologna@redhat.com> In-Reply-To: <20180320162400.5084-1-abologna@redhat.com> References: <20180320162400.5084-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [jenkins-ci PATCH 4/3] guests: Remove ad-hoc package installation 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: , MIME-Version: 1.0 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.30]); Wed, 21 Mar 2018 12:20:20 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" There is a small number of packages that we install as part of the 'base' task with an ad-hoc call to the package module. Since we have generic facilities for installing packages and a generic 'base' pseudo-project that we use for all packages that are not related to any specific project, we can fold everything into it and have a single source of truth. The change requires us to delay user creation, though, because as part of that we edit the sudoers file, which doesn't exist until the sudo package has been installed. Signed-off-by: Andrea Bolognani Reviewed-by: Pavel Hrdina --- guests/site.yml | 7 +++++-- guests/tasks/base.yml | 11 ----------- guests/vars/mappings.yml | 15 +++++++++++++++ guests/vars/projects/base.yml | 5 +++++ 4 files changed, 25 insertions(+), 13 deletions(-) diff --git a/guests/site.yml b/guests/site.yml index 4207d4e..d057116 100644 --- a/guests/site.yml +++ b/guests/site.yml @@ -14,16 +14,19 @@ =20 tasks: =20 - # Prepare the base environment + # Prepare environment. None of the actions performed here might + # depend on packages being installed - include: tasks/base.yml - include: tasks/compat.yml - - include: tasks/user.yml =20 # Install base packages - include: tasks/packages.yml vars: project: base =20 + # Create users. This needs to happen after installing base packages + - include: tasks/user.yml + # Install build dependencies for each project - include: tasks/packages.yml with_items: diff --git a/guests/tasks/base.yml b/guests/tasks/base.yml index 8d7ff44..5379bf6 100644 --- a/guests/tasks/base.yml +++ b/guests/tasks/base.yml @@ -115,17 +115,6 @@ when: - package_format =3D=3D 'pkg' =20 -- name: Install base packages - package: - name: '{{ item }}' - state: present - with_items: - - bash - - git - - screen - - sudo - - vim - - name: Remove unwanted packages package: name: '{{ item }}' diff --git a/guests/vars/mappings.yml b/guests/vars/mappings.yml index 190013e..f6ac801 100644 --- a/guests/vars/mappings.yml +++ b/guests/vars/mappings.yml @@ -53,6 +53,9 @@ mappings: pkg: avahi rpm: avahi-devel =20 + bash: + default: bash + bash-completion: default: bash-completion CentOS6: @@ -107,6 +110,9 @@ mappings: gettext: default: gettext =20 + git: + default: git + glib2: deb: libglib2.0-dev pkg: glib @@ -635,6 +641,9 @@ mappings: rpm: sanlock-devel Ubuntu12: =20 + screen: + default: screen + scrub: default: scrub FreeBSD: diskscrub @@ -654,6 +663,9 @@ mappings: rpm: spice-gtk3-devel CentOS6: =20 + sudo: + default: sudo + unzip: default: unzip FreeBSD: @@ -667,6 +679,9 @@ mappings: deb: valac CentOS6: =20 + vim: + default: vim + wget: default: wget =20 diff --git a/guests/vars/projects/base.yml b/guests/vars/projects/base.yml index d82f6b9..94644e4 100644 --- a/guests/vars/projects/base.yml +++ b/guests/vars/projects/base.yml @@ -3,10 +3,12 @@ packages: - autoconf - automake - autopoint + - bash - ccache - cppi - gcc - gettext + - git - glibc - libtool - libtoolize @@ -15,3 +17,6 @@ packages: - perl - pkg-config - rpmbuild + - screen + - sudo + - vim --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list