From nobody Fri Apr 26 17:58:36 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=1575311585; cv=none; d=zohomail.com; s=zohoarc; b=DXwI7tnYyOW667K5WuSP2mmBXAE1F/woxLyKNv2aOxKMWRXQIilUTvT4chsaoq0qx9NfdseVe8apl97MT4+wMCKzkYdYzh2kAT1wbD5E1rkOF4+QMHd4A2dLoEP0edHp1B1wslMUemtX6XFczAAYOaczcUJqZbssnWSd2irtBUY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1575311585; h=Content-Type:Content-Transfer-Encoding:Cc: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=R5Ke79glEwGDTjBgeSmxBkinFLthZieI8BeATjAA7DU=; b=Z64YwTIBJBnSrgpPm2nIWKk/Ha/LGYwhqyn6G31jJK2cv8YK2yMSzow+pD/IUFzs4QAIJh3hVzZOKXMQXohwi9/h/Q7DrFAZeVCPGfPE7QnZwzYPpahlt+x6jgE3ogtWFHcjpVnIEp+RH2saptSBr++GCOpqlKmRzWJrItF5D8w= 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 1575311585890282.9275202765731; Mon, 2 Dec 2019 10:33:05 -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-297-I0kZBb0TOHWmqYp1aMHNFA-1; Mon, 02 Dec 2019 13:32:43 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0923010054E3; Mon, 2 Dec 2019 18:32:38 +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 D6E7B5D6AE; Mon, 2 Dec 2019 18:32:37 +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 94C6F4EA4B; Mon, 2 Dec 2019 18:32:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xB2IWSqf007193 for ; Mon, 2 Dec 2019 13:32:28 -0500 Received: by smtp.corp.redhat.com (Postfix) id 78AAF1001901; Mon, 2 Dec 2019 18:32:28 +0000 (UTC) Received: from kinshicho.usersys.redhat.com (ovpn-205-138.brq.redhat.com [10.40.205.138]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4254610013A7; Mon, 2 Dec 2019 18:32:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575311583; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=R5Ke79glEwGDTjBgeSmxBkinFLthZieI8BeATjAA7DU=; b=YxZY2jWzSqPefzWbrlXil6IbGQ1E0IUaKSicxD4FiWZ2qIHBwi7ohVcks6A97JbFQcfeBt ZRXxNW7Xy82zfYveEVm0aTWryBU0AXsigSqB6ER5Mbpdael+PF002ZhcSiCRTjwh/tC8e2 +x8iP1lMsGjmXVlCBfHv/tiv8QnK4xU= From: Andrea Bolognani To: libvir-list@redhat.com Date: Mon, 2 Dec 2019 19:32:14 +0100 Message-Id: <20191202183215.168900-2-abologna@redhat.com> In-Reply-To: <20191202183215.168900-1-abologna@redhat.com> References: <20191202183215.168900-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: fidencio@redhat.com Subject: [libvirt] [jenkins-ci PATCH 1/2] lcitool: Search /etc and /usr/local/etc separately 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.15 X-MC-Unique: I0kZBb0TOHWmqYp1aMHNFA-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" Some operating systems (notably openSUSE) have the former but not the latter, which results in the single call to find(1) we've used so far to fail. Signed-off-by: Andrea Bolognani Reviewed-by: Fabiano Fid=C3=AAncio --- I tried implementing my original suggestion and it turned out to be much worse than what Jim and Fabiano proposed, so I've decided to go for the latter (except fixed ;). guests/playbooks/update/tasks/paths.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guests/playbooks/update/tasks/paths.yml b/guests/playbooks/upd= ate/tasks/paths.yml index 770680e..aada1f3 100644 --- a/guests/playbooks/update/tasks/paths.yml +++ b/guests/playbooks/update/tasks/paths.yml @@ -17,7 +17,7 @@ - su =20 - name: 'Look for files' - shell: 'find /etc /usr/local/etc -name {{ item }} 2>/dev/null' + shell: '(find /usr/local/etc -name {{ item }}; find /etc -name {{ item }= }) 2>/dev/null' register: find with_items: - sudoers --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri Apr 26 17:58:36 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.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 205.139.110.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=1575311561; cv=none; d=zohomail.com; s=zohoarc; b=Uv/o9+WPWCSDiKY/R3pFccnseCL/lq223gN4LNsrFXA+NbVkbHDb13+vzmwFB6IqRXzKKg3HR4qEtq4nwM6z5gXST32fYCVk4wAiWorLmclHXx6veO51F68+OhIdZdn26r3avtt4ModTVvCKuRcjHhoB5Knh9p796ppToSbZ80U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1575311561; h=Content-Type:Content-Transfer-Encoding:Cc: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=PTLU5ujy+tatpg2F8aLKn8xxrHaMDinJAOD0IJLOtqI=; b=lcTN0tb3w7fyzEJ09qiRLW+VcPgjPgpABIx6kg0ysrffSgQiI8Z5yf/b5BNcFwrazsjcMjlm77yI37lhcoe9/0hEvRpb22i+OGP/yTt7WvACyb8uBYjy/HAHfmPe3ZTP4jR2IPY5LliSLZTjNIr80R6lF+ukikJR0/mUu2SHc0k= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.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 [205.139.110.120]) by mx.zohomail.com with SMTPS id 1575311561257165.27961880105977; Mon, 2 Dec 2019 10:32:41 -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-42-KTBlrA9UPweq_Vo7zK3acg-1; Mon, 02 Dec 2019 13:32:38 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E1579107ACC9; Mon, 2 Dec 2019 18:32:32 +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 ADF665C240; Mon, 2 Dec 2019 18:32:32 +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 18D3718089CF; Mon, 2 Dec 2019 18:32:32 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xB2IWUwM007204 for ; Mon, 2 Dec 2019 13:32:30 -0500 Received: by smtp.corp.redhat.com (Postfix) id 9F6F51001901; Mon, 2 Dec 2019 18:32:30 +0000 (UTC) Received: from kinshicho.usersys.redhat.com (ovpn-205-138.brq.redhat.com [10.40.205.138]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1B07910013A7; Mon, 2 Dec 2019 18:32:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575311560; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=PTLU5ujy+tatpg2F8aLKn8xxrHaMDinJAOD0IJLOtqI=; b=aLKUnEhsnNvVD4IgeI29qR9TSSwM8gyYAzG1TczVX1Ly7AaMZGbgvmvuB7cD/4VAemzo2q EURV2AaBeFebNFqToT7mqZyWEjdbZmIe2pCMjN099TAmIPJMpBvLhfBKd7klWD0o9MgZpR HXZ3l/dw6RaFbXunLWkHnmdUPht/YK4= From: Andrea Bolognani To: libvir-list@redhat.com Date: Mon, 2 Dec 2019 19:32:15 +0100 Message-Id: <20191202183215.168900-3-abologna@redhat.com> In-Reply-To: <20191202183215.168900-1-abologna@redhat.com> References: <20191202183215.168900-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: fidencio@redhat.com Subject: [libvirt] [jenkins-ci PATCH 2/2] lcitool: Create group and user separately 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.16 X-MC-Unique: KTBlrA9UPweq_Vo7zK3acg-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" Some operating systems (notably openSUSE) don't create a group with the same name when a user is created: create it explicitly so that we can later rely on it being present. Signed-off-by: Andrea Bolognani Reviewed-by: Fabiano Fid=C3=AAncio --- guests/playbooks/update/tasks/users.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/guests/playbooks/update/tasks/users.yml b/guests/playbooks/upd= ate/tasks/users.yml index 0470686..a6fb0aa 100644 --- a/guests/playbooks/update/tasks/users.yml +++ b/guests/playbooks/update/tasks/users.yml @@ -18,9 +18,15 @@ line: 'PermitRootLogin without-password' state: present =20 +- name: '{{ flavor }}: Create group' + group: + name: '{{ flavor }}' + state: present + - name: '{{ flavor }}: Create user account' user: name: '{{ flavor }}' + group: '{{ flavor }}' comment: '{{ flavor }}' password: '*' shell: '{{ bash }}' --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list