Skip to content

Commit 32c721f

Browse files
committed
Fix some more
1 parent 7f0e230 commit 32c721f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

common/configuration/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ output "terraform_facts" {
142142
}
143143

144144
output "puppetservers" {
145-
value = { for host, values in local.final_inventory : host => values.local_ip if contains(values.tags, "puppet") }
145+
value = { for host, values in local.final_inventory : host => { local_ip = values.local_ip, public_ip = values.public_ip } if contains(values.tags, "puppet") }
146146
}
147147

148148
output "guest_passwd" {

common/provision/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ resource "terraform_data" "deploy_puppetserver_files" {
7474
bastion_user = "tf"
7575
bastion_private_key = var.configuration.ssh_key.private
7676
user = "tf"
77-
host = each.value
77+
host = local.puppetservers_are_bastion ? each.value.public_ip : each.value.local_ip
7878
private_key = var.configuration.ssh_key.private
7979
}
8080

0 commit comments

Comments
 (0)