All of lore.kernel.org
 help / color / mirror / Atom feed
From: cel@kernel.org
To: <kdevops@lists.linux.dev>
Cc: Daniel Gomez <da.gomez@kernel.org>, Chuck Lever <chuck.lever@oracle.com>
Subject: [PATCH v1 1/2] bootlinux: Modernize install-deps/main.yml
Date: Sun, 18 May 2025 10:18:37 -0400	[thread overview]
Message-ID: <20250518141838.176772-1-cel@kernel.org> (raw)

From: Chuck Lever <chuck.lever@oracle.com>

This subrole is run using include_tasks, but install-deps/main.yml
then imports the distribution-specific steps. It's better to avoid
mixing import_tasks and include_tasks.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 .../bootlinux/tasks/install-deps/main.yml     | 21 ++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/playbooks/roles/bootlinux/tasks/install-deps/main.yml b/playbooks/roles/bootlinux/tasks/install-deps/main.yml
index c4c16d20509c..2931f9fe06e3 100644
--- a/playbooks/roles/bootlinux/tasks/install-deps/main.yml
+++ b/playbooks/roles/bootlinux/tasks/install-deps/main.yml
@@ -1,8 +1,15 @@
 ---
-- name: oscheck distribution ospecific setup
-  import_tasks: debian/main.yml
-  when: ansible_facts['os_family']|lower == 'debian'
-- import_tasks: suse/main.yml
-  when: ansible_facts['os_family']|lower == 'suse'
-- import_tasks: redhat/main.yml
-  when: ansible_facts['os_family']|lower == 'redhat'
+- name: Debian-specific setup
+  ansible.builtin.include_tasks: debian/main.yml
+  when:
+    - ansible_os_family == "Debian"
+
+- name: SuSE-specific setup
+  ansible.builtin.include_tasks: suse/main.yml
+  when:
+    - ansible_os_family == "Suse"
+
+- name: Red Hat-specific setup
+  ansible.builtin.include_tasks: redhat/main.yml
+  when:
+    - ansible_os_family == "RedHat"
-- 
2.49.0


             reply	other threads:[~2025-05-18 14:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-18 14:18 cel [this message]
2025-05-18 14:18 ` [PATCH v1 2/2] bootlinux: Fold bootlinux-local into the bootlinux role cel
2025-05-19  9:32   ` Daniel Gomez
2025-05-19 13:15     ` Chuck Lever
2025-05-19 13:38       ` Daniel Gomez
2025-05-19 13:50         ` Chuck Lever
2025-05-19  9:13 ` [PATCH v1 1/2] bootlinux: Modernize install-deps/main.yml Daniel Gomez
2025-05-19 13:11   ` Chuck Lever
2025-05-19 13:51     ` Daniel Gomez

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=20250518141838.176772-1-cel@kernel.org \
    --to=cel@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=da.gomez@kernel.org \
    --cc=kdevops@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.