forked from wellsaar/terraform-js2-k8cluster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
output.tf
30 lines (25 loc) · 1.06 KB
/
output.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
################
#Output
################
output "floating_ip_ubuntu20_leader_" {
value = openstack_networking_floatingip_v2.terraform_floatip_ubuntu20_leader_.*.address
description = "Public IP for Ubuntu 20 leader"
}
output "floating_ip_ubuntu20_follower_" {
value = openstack_networking_floatingip_v2.terraform_floatip_ubuntu20_follower_.*.address
description = "Public IP for Ubuntu 20 followers"
}
output "floating_ip_ubuntu20_gpu_" {
value = openstack_networking_floatingip_v2.terraform_floatip_ubuntu20_gpu_.*.address
description = "Public IP for Ubuntu 20 gpus"
}
resource "local_file" "ansible_inventory" {
content = templatefile("${path.module}/inventory.tftpl",
{
ansible_leader_ip = openstack_networking_floatingip_v2.terraform_floatip_ubuntu20_leader_.*.address,
ansible_follower_ip = openstack_networking_floatingip_v2.terraform_floatip_ubuntu20_follower_.*.address,
ansible_gpu_ip = openstack_networking_floatingip_v2.terraform_floatip_ubuntu20_gpu_.*.address,
}
)
filename = "ansible/inventory.ini"
}