public inbox for kdevops@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH v1 1/2] bootlinux: Modernize install-deps/main.yml
@ 2025-05-18 14:18 cel
  2025-05-18 14:18 ` [PATCH v1 2/2] bootlinux: Fold bootlinux-local into the bootlinux role cel
  2025-05-19  9:13 ` [PATCH v1 1/2] bootlinux: Modernize install-deps/main.yml Daniel Gomez
  0 siblings, 2 replies; 9+ messages in thread
From: cel @ 2025-05-18 14:18 UTC (permalink / raw)
  To: kdevops; +Cc: Daniel Gomez, Chuck Lever

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


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-05-19 13:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-18 14:18 [PATCH v1 1/2] bootlinux: Modernize install-deps/main.yml cel
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox