From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BCA61175D5D for ; Thu, 22 May 2025 17:13:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747934014; cv=none; b=PeVgJepAEj4NDX/9qPxvv3DT2RtKfAvRKEllPsr9rlAWXSwhhTch216l3Q0BAj/ygpRcJxjCvkN2brHBQJAkMelAdIdn9/b+gtJJBTnC6wrNTV4d1K2yTz45YJrKzwh5ayTC1cnJINi1eNRL0Zd2rpoV8s6pXa16s6OEv7Wi7FY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747934014; c=relaxed/simple; bh=9fbyFYVTNyz+HyPpsO1K79Ha52ISvBjUMUSzxewD0HA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=BCchQqEzHiInVh6z2h3r7FLjIkCFhENYIqRXKg3iJHBEQ8vviNIxLDYiHI9wnGUnnjvZfq9e7fnZwGqU+GsBGF6WtO95oar6sd+jT7szMcmNNrAG4dH+fKGUHqqoPdK+s4JhRIy+hpKRsuNSaknkkJu51XVP0nS982TpKjxikTY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Lps26NQ4; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Lps26NQ4" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 55AA1C4CEE4; Thu, 22 May 2025 17:13:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1747934014; bh=9fbyFYVTNyz+HyPpsO1K79Ha52ISvBjUMUSzxewD0HA=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Lps26NQ4ePkDDiw5JgRTUCFbmVFoylrkt+5+d0S0qAWX+dMYA+37sj5hK2Nsnk8d9 9efUkUq+uNm0Z/SX/jXoL0tnw4uRR8i4zfw7TUv2a7WhqBp9EoDHnASgstgVI9nFPF IgIUjrM2EP+IGhIzxqixdYohh7/p8+IfVZYP+2qQKFyiFpCDHXIMzBihEzJYd98cY5 F8RecqVOc5duZtdI63VGqCDSg0PYQ8RGtV5YbJobZQIMA+zw9vNdO6Qc1bGIEDRCfU F8U0iU6WsQog27aEp75CMG7SnbLjtjezhvjV4gcCMfzQuhM7JdIqFHF8EF2CWK7avh VMpJ7QKXh4ROw== Message-ID: Date: Thu, 22 May 2025 13:13:33 -0400 Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH 2/5] Move the guestfs install-deps to the guestfs playbook To: Luis Chamberlain Cc: kdevops@lists.linux.dev, Chuck Lever References: <20250522133137.989457-1-cel@kernel.org> <20250522133137.989457-3-cel@kernel.org> Content-Language: en-US From: Chuck Lever Organization: kernel.org In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 5/22/25 1:07 PM, Luis Chamberlain wrote: > On Thu, May 22, 2025 at 09:31:34AM -0400, cel@kernel.org wrote: >> From: Chuck Lever >> >> In addition to copying the install-deps scripts, switch to using >> import_tasks, which has more dependable behavior and avoids the >> need to add a "tags:" keyword on each step. >> >> Signed-off-by: Chuck Lever >> diff --git a/playbooks/roles/guestfs/tasks/install-deps/debian/main.yml b/playbooks/roles/guestfs/tasks/install-deps/debian/main.yml >> + become: true >> + become_method: ansible.builtin.sudo >> + ansible.builtin.package: >> + update_cache: true >> + name: >> + - libguestfs-tools >> + - isc-dhcp-client >> + state: present >> diff --git a/playbooks/roles/guestfs/tasks/install-deps/main.yml b/playbooks/roles/guestfs/tasks/install-deps/main.yml >> +++ b/playbooks/roles/guestfs/tasks/install-deps/redhat/main.yml >> + become: true >> + become_method: ansible.builtin.sudo >> + ansible.builtin.package: >> + update_cache: true >> + name: >> + - libguestfs-tools >> + - dhcpcd >> + state: present >> + when: >> + - ansible_distribution != "Fedora" >> diff --git a/playbooks/roles/guestfs/tasks/install-deps/suse/main.yml b/playbooks/roles/guestfs/tasks/install-deps/suse/main.yml >> new file mode 100644 >> index 000000000000..c1bf24354612 >> --- /dev/null >> +++ b/playbooks/roles/guestfs/tasks/install-deps/suse/main.yml >> + become: true >> + become_method: ansible.builtin.sudo >> + ansible.builtin.package: >> + name: >> + - libguestfs-tools >> + - dhcpcd >> + state: present > > If you use the pkg role then we'd just need to add a definition > overide for dhcpd for debian as isc-dhcp-client and we'd have one > shared install step here. Almost true. Check redhat/main.yml -- there is a little extra logic there. Also, I've done that kind of de-duplication in the past, and half the time I end up undo-ing it because more logic is needed at a later point. Thinking ahead (always dangerous). > Otherwise: > > Reviewed-by: Luis Chamberlain > > Luis -- Chuck Lever