my-homelab-configs/apps/gitea/host_prep.tf

19 lines
398 B
HCL

resource "null_resource" "node_prep" {
for_each = var.nodes
connection {
type = "ssh"
user = each.value.user
host = each.value.ip
private_key = file(var.ssh_key_path)
}
provisioner "remote-exec" {
inline = [
"sudo apt-get update",
"sudo apt-get install -y open-iscsi util-linux",
"sudo systemctl enable --now iscsid"
]
}
}