Commit f4a4e34
committed
gen_hosts: Add missing generic workflow template
When no specific workflow is configured in kdevops (CONFIG_WORKFLOWS=y
but no specific workflow like fstests, blktests, etc. selected), the
gen_hosts role would fail with:
Error rendering template: 'workflows/generic.j2' not found
This occurs because the hosts.j2 template tries to include
'workflows/generic.j2' when kdevops_workflow_name is undefined, but
this template file didn't exist.
The solution adds a new generic.j2 template that handles the case where
no specific workflow is configured. It creates a simple hosts inventory
using the kdevops_host_prefix as the node name.
The template also properly handles the case where all_generic_nodes
might not be defined, which can happen with certain cloud providers
like Lambda Labs when using Terraform without a dedicated workflow.
This fix allows users to:
- Use kdevops with cloud providers without selecting a specific workflow
- Get started with basic infrastructure provisioning before choosing a
testing workflow
- Avoid build failures during initial configuration
Fixes: 40df5ef ("gen_hosts: use kdevops_workflow_name directly for template selection")
Generated-by: Claude AI
Signed-off-by: Luis Chamberlain <[email protected]>1 parent 2dc55c8 commit f4a4e34
File tree
2 files changed
+26
-1
lines changed- playbooks/roles/gen_hosts/templates
- workflows
2 files changed
+26
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
14 | 17 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
0 commit comments