From: Chuck Lever <cel@kernel.org>
To: Luis Chamberlain <mcgrof@kernel.org>
Cc: kdevops@lists.linux.dev, Chuck Lever <chuck.lever@oracle.com>
Subject: Re: [RFC PATCH 2/5] Move the guestfs install-deps to the guestfs playbook
Date: Thu, 22 May 2025 13:13:33 -0400 [thread overview]
Message-ID: <acf331ca-37b7-4d64-a5c8-bb23ef5e2fd7@kernel.org> (raw)
In-Reply-To: <aC9ZvtvIdkWGATlD@bombadil.infradead.org>
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 <chuck.lever@oracle.com>
>>
>> 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 <chuck.lever@oracle.com>
>> 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 <mcgrof@kernel.org>
>
> Luis
--
Chuck Lever
next prev parent reply other threads:[~2025-05-22 17:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-22 13:31 [RFC PATCH 0/5] Convert bringup_guestfs to a single Ansible role cel
2025-05-22 13:31 ` [RFC PATCH 1/5] guestfs: Replace scripts/destroy_guestfs.sh with an Ansible playbook cel
2025-05-22 17:02 ` Luis Chamberlain
2025-05-22 17:03 ` Chuck Lever
2025-05-22 13:31 ` [RFC PATCH 2/5] Move the guestfs install-deps to the guestfs playbook cel
2025-05-22 17:07 ` Luis Chamberlain
2025-05-22 17:13 ` Chuck Lever [this message]
2025-05-22 17:16 ` Luis Chamberlain
2025-05-22 13:31 ` [RFC PATCH 3/5] guestfs: Move console-related steps to guestfs role cel
2025-05-22 17:09 ` Luis Chamberlain
2025-05-22 17:11 ` Chuck Lever
2025-05-22 17:15 ` Luis Chamberlain
2025-05-22 13:31 ` [RFC PATCH 4/5] guestfs: Move check-config, network, and storage-pool tags cel
2025-05-22 13:31 ` [RFC PATCH 5/5] guestfs: Convert part of scripts/bringup_guestfs.sh to Ansible cel
2025-05-22 17:14 ` Luis Chamberlain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=acf331ca-37b7-4d64-a5c8-bb23ef5e2fd7@kernel.org \
--to=cel@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=kdevops@lists.linux.dev \
--cc=mcgrof@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox