Skip to content

Commit 21baf19

Browse files
committed
gen_nodes: fix YAML indentation in pcipassthrough template
The template was generating malformed YAML with improper indentation and missing newlines between passthrough entries. This caused parsing errors: "Colons in unquoted values must be followed by a non-space character." Fixed by: - Removing the trailing whitespace stripping after 'pcipassthrough:' - Ensuring proper indentation for all passthrough entries - Maintaining consistent whitespace control throughout the macro The generated YAML now correctly produces a single 'pcipassthrough' key with properly indented sub-entries for all devices. Generated-by: Claude AI Reviewed-by: Chuck Lever <[email protected]> Signed-off-by: Luis Chamberlain <[email protected]>
1 parent 3c839c0 commit 21baf19

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

playbooks/roles/gen_nodes/templates/gen_nodes_list.j2

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@
55
{%- if not ns.has_devices -%}
66
{%- set ns.has_devices = true %}
77
pcipassthrough:
8-
{% endif -%}
9-
passthrough{{ ns.device_index | string }}:
8+
{% endif %} passthrough{{ ns.device_index | string }}:
109
domain: {{ d.domain }}
1110
bus: {{ d.bus }}
1211
slot: {{ d.slot }}
1312
function: {{ d.function }}
14-
{%- set ns.device_index = ns.device_index + 1 -%}
15-
{%- endif %}
13+
{% set ns.device_index = ns.device_index + 1 -%}
14+
{%- endif -%}
1615
{%- endfor -%}
1716
{%- endmacro -%}
1817
{%- macro gen_pci_passthrough( device_list ) -%}

0 commit comments

Comments
 (0)