File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ ${cluster_name}_${group_name}:
26
26
image_id: ${ node.image_id }
27
27
networks: ${ jsonencode({for n in node.network: n.name => {" fixed_ip_v4" : n.fixed_ip_v4, " fixed_ip_v6" : n.fixed_ip_v6} })}
28
28
node_fqdn: ${ login_groups[group_name][" fqdns" ][nodename]}
29
+ node_fip: ${ login_groups[group_name][" nodegroup_fips" ][nodename]}
29
30
%{ endfor ~}
30
31
31
32
${ group_name} :
@@ -77,6 +78,7 @@ ${cluster_name}_${group_name}:
77
78
instance_id: ${ node.id }
78
79
networks: ${ jsonencode({for n in node.network: n.name => {" fixed_ip_v4" : n.fixed_ip_v4, " fixed_ip_v6" : n.fixed_ip_v6} })}
79
80
node_fqdn: ${ additional_groups[group_name][" fqdns" ][nodename]}
81
+ node_fip: ${ additional_groups[group_name][" nodegroup_fips" ][nodename]}
80
82
%{ endfor ~}
81
83
${ group_name} :
82
84
children:
Original file line number Diff line number Diff line change @@ -25,6 +25,11 @@ locals {
25
25
}
26
26
)
27
27
}
28
+ # Map node names to floating IPs from the list var.fip_addresses by index
29
+ nodegroup_fips = {
30
+ for idx , n in var . nodes :
31
+ n = > length (var. fip_addresses ) > idx ? var.fip_addresses[idx] : " "
32
+ }
28
33
29
34
baremetal_az = var. availability_zone != null ? var. availability_zone : " nova"
30
35
}
@@ -229,3 +234,7 @@ output "image_id" {
229
234
output "fqdns" {
230
235
value = local. fqdns
231
236
}
237
+
238
+ output "nodegroup_fips" {
239
+ value = local. nodegroup_fips
240
+ }
You can’t perform that action at this time.
0 commit comments