[PATCH 6/8] gen_hosts: make the linux workflow node name follow bootlinux_builder

Daniel Gomez <[email protected]> Thu, 23 Apr 2026 00:16:47 +0200
Newsgroups dev.linux.lists.kdevops
Message-ID <[email protected]>
From: Daniel Gomez <[email protected]>

workflows/linux.j2 hardcoded <prefix>-builder as the node name
regardless of whether a dedicated builder was requested.
Everywhere else in kdevops the convention is <prefix>-builder
when bootlinux_builder is set and <prefix> otherwise, and
gen_nodes already emits names along that rule. The template
produced inventory entries gen_nodes did not cover; fix it so
both sides agree.

Fixes: 3089c3fec57 ("nixos: add NixOS support as third bringup option with libvirt integration")
Generated-by: Claude AI
Signed-off-by: Daniel Gomez <[email protected]>
---
 playbooks/roles/gen_hosts/templates/workflows/linux.j2 | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/playbooks/roles/gen_hosts/templates/workflows/linux.j2 b/playbooks/roles/gen_hosts/templates/workflows/linux.j2
index 47c20ab8..79a11757 100644
--- a/playbooks/roles/gen_hosts/templates/workflows/linux.j2
+++ b/playbooks/roles/gen_hosts/templates/workflows/linux.j2
@@ -1,12 +1,23 @@
-{# Template for the kernel builder workflow #}
+{# Template for the bootlinux workflow.
+
+   When bootlinux_builder is set, a dedicated build node carries the
+   -builder suffix (matching gen_nodes' builder_nodes list). Otherwise
+   the node takes the generic prefix-only name that gen_nodes emits
+   as generic_nodes.
+#}
+{% if bootlinux_builder | default(false) %}
+{% set node_name = kdevops_host_prefix + '-builder' %}
+{% else %}
+{% set node_name = kdevops_host_prefix %}
+{% endif %}
 [all]
 localhost ansible_connection=local
-{{ kdevops_host_prefix }}-builder
+{{ node_name }}
 [all:vars]
 ansible_python_interpreter =  "{{ kdevops_python_interpreter }}"
 
 [baseline]
-{{ kdevops_host_prefix }}-builder
+{{ node_name }}
 [baseline:vars]
 ansible_python_interpreter =  "{{ kdevops_baseline_python_interpreter }}"
 

-- 
2.53.0