Skip to content

Commit 87a087a

Browse files
committed
Fix terraform output for multiple partitions
1 parent e0c18bd commit 87a087a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

roles/cluster_infra/templates/outputs.tf.j2

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,18 @@ output "cluster_nodes" {
2424
}
2525
}
2626
],
27+
{% for partition in openhpc_slurm_partitions %}
2728
[
28-
for compute in openstack_compute_instance_v2.compute: {
29+
for compute in openstack_compute_instance_v2.{{ partition.name }}: {
2930
name = compute.name
3031
ip = compute.network[0].fixed_ip_v4
31-
groups = ["{{ cluster_name }}_compute"],
32+
groups = ["{{ cluster_name }}_compute", "{{ cluster_name }}_{{ partition.name }}"],
3233
facts = {
3334
openstack_project_id = data.openstack_identity_auth_scope_v3.scope.project_id
3435
}
3536
}
36-
]
37+
]{{ ',' if not loop.last }}
38+
{% endfor %}
3739
)
3840
}
3941

0 commit comments

Comments
 (0)