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}:
2626 image_id: ${ node.image_id }
2727 networks: ${ jsonencode({for n in node.network: n.name => {" fixed_ip_v4" : n.fixed_ip_v4, " fixed_ip_v6" : n.fixed_ip_v6} })}
2828 node_fqdn: ${ login_groups[group_name][" fqdns" ][nodename]}
29+ node_fip: ${ login_groups[group_name][" nodegroup_fips" ][nodename]}
2930%{ endfor ~}
3031
3132${ group_name} :
@@ -77,6 +78,7 @@ ${cluster_name}_${group_name}:
7778 instance_id: ${ node.id }
7879 networks: ${ jsonencode({for n in node.network: n.name => {" fixed_ip_v4" : n.fixed_ip_v4, " fixed_ip_v6" : n.fixed_ip_v6} })}
7980 node_fqdn: ${ additional_groups[group_name][" fqdns" ][nodename]}
81+ node_fip: ${ additional_groups[group_name][" nodegroup_fips" ][nodename]}
8082%{ endfor ~}
8183${ group_name} :
8284 children:
Original file line number Diff line number Diff line change @@ -25,6 +25,11 @@ locals {
2525 }
2626 )
2727 }
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+ }
2833
2934 baremetal_az = var. availability_zone != null ? var. availability_zone : " nova"
3035}
@@ -229,3 +234,7 @@ output "image_id" {
229234output "fqdns" {
230235 value = local. fqdns
231236}
237+
238+ output "nodegroup_fips" {
239+ value = local. nodegroup_fips
240+ }
You can’t perform that action at this time.
0 commit comments