Skip to content
This repository was archived by the owner on Aug 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #53 from empovit/main
Browse files Browse the repository at this point in the history
fix $HOME expansion bug
  • Loading branch information
displague authored Apr 18, 2022
2 parents dd87230 + 8a08080 commit c8b197e
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,12 @@ resource "null_resource" "run_pre_reqs" {
metal_token = var.auth_token,
})

destination = "$HOME/bootstrap/vars.py"
destination = "bootstrap/vars.py"
}

provisioner "file" {
content = file("${path.module}/templates/pre_reqs.py")
destination = "$HOME/bootstrap/pre_reqs.py"
destination = "bootstrap/pre_reqs.py"
}

provisioner "remote-exec" {
Expand Down Expand Up @@ -232,7 +232,7 @@ resource "null_resource" "copy_gcs_key" {
}
provisioner "file" {
content = file(local.gcs_key_path)
destination = "$HOME/bootstrap/gcp_storage_reader.json"
destination = "bootstrap/gcp_storage_reader.json"
}
}

Expand All @@ -250,12 +250,7 @@ resource "null_resource" "download_vcenter_iso" {

provisioner "file" {
content = data.template_file.download_vcenter.rendered
destination = "$HOME/bootstrap/download_vcenter.sh"
}

provisioner "file" {
content = data.template_file.download_vcenter.rendered
destination = "$HOME/bootstrap/download_vcenter.sh"
destination = "bootstrap/download_vcenter.sh"
}

provisioner "remote-exec" {
Expand Down Expand Up @@ -283,6 +278,7 @@ resource "random_password" "vpn_pass" {
special = true
}


data "template_file" "vpn_installer" {
template = file("${path.module}/templates/l2tp_vpn.sh")
vars = {
Expand All @@ -306,7 +302,7 @@ resource "null_resource" "install_vpn_server" {

provisioner "file" {
content = data.template_file.vpn_installer.rendered
destination = "$HOME/bootstrap/vpn_installer.sh"
destination = "bootstrap/vpn_installer.sh"
}

provisioner "remote-exec" {
Expand Down Expand Up @@ -356,7 +352,7 @@ resource "null_resource" "copy_vcva_template" {
vcenter_domain = var.vcenter_domain,
})

destination = "$HOME/bootstrap/vcva_template.json"
destination = "bootstrap/vcva_template.json"
}
}

Expand All @@ -371,7 +367,7 @@ resource "null_resource" "copy_update_uplinks" {

provisioner "file" {
content = file("${path.module}/templates/update_uplinks.py")
destination = "$HOME/bootstrap/update_uplinks.py"
destination = "bootstrap/update_uplinks.py"
}
}

Expand All @@ -386,7 +382,7 @@ resource "null_resource" "esx_network_prereqs" {

provisioner "file" {
content = file("${path.module}/templates/esx_host_networking.py")
destination = "$HOME/bootstrap/esx_host_networking.py"
destination = "bootstrap/esx_host_networking.py"
}
}

Expand Down Expand Up @@ -425,17 +421,17 @@ resource "null_resource" "deploy_vcva" {

provisioner "file" {
source = "${path.module}/templates/extend_datastore.sh"
destination = "$HOME/bootstrap/extend_datastore.sh"
destination = "bootstrap/extend_datastore.sh"
}

provisioner "file" {
content = file("${path.module}/templates/vsan_claim.py")
destination = "$HOME/bootstrap/vsan_claim.py"
destination = "bootstrap/vsan_claim.py"
}

provisioner "file" {
content = file("${path.module}/templates/deploy_vcva.py")
destination = "$HOME/bootstrap/deploy_vcva.py"
destination = "bootstrap/deploy_vcva.py"
}

provisioner "remote-exec" {
Expand Down

0 comments on commit c8b197e

Please sign in to comment.