Skip to content
This repository has been archived by the owner on Aug 18, 2023. It is now read-only.

Commit

Permalink
Use the bastion IP in helpernode inventory (#61)
Browse files Browse the repository at this point in the history
Signed-off-by: Zack Cerza <zack@redhat.com>
  • Loading branch information
zmc authored Oct 27, 2020
1 parent cbf4271 commit 6545aa9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions modules/3_helpernode/helpernode.tf
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ locals {
client_tarball = var.openshift_client_tarball
install_tarball = var.openshift_install_tarball
}

helpernode_inventory = {
bastion_ip = var.bastion_ip
}
}

resource "null_resource" "config" {
Expand All @@ -80,6 +84,12 @@ resource "null_resource" "config" {
"cd ocp4-helpernode && git checkout ${var.helpernode_tag}"
]
}

provisioner "file" {
content = templatefile("${path.module}/templates/helpernode_inventory", local.helpernode_inventory)
destination = "~/ocp4-helpernode/inventory"
}

provisioner "file" {
content = templatefile("${path.module}/templates/helpernode_vars.yaml", local.helpernode_vars)
destination = "~/ocp4-helpernode/helpernode_vars.yaml"
Expand Down
2 changes: 2 additions & 0 deletions modules/3_helpernode/templates/helpernode_inventory
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[vmhost]
${bastion_ip} ansible_connection=ssh ansible_user=root

0 comments on commit 6545aa9

Please sign in to comment.