Код: Выделить всё
provisioner "file" {
source = "scripts/base.sh"
destination = "/tmp/base.sh"
connection {
type = "ssh"
user = var.c_user
password = var.d_passwd_user
host = var.vm_ip
}
}
Код: Выделить всё
provisioner "remote-exec" {
inline = [
"echo 'SSH connection successful' > /tmp/1ssh_test_flag",
"alias sudo='sudo -S
Подробнее здесь: [url]https://stackoverflow.com/questions/79167063/terraform-opentofu-provided-variables-are-not-available-to-remotely-executed-s[/url]
Мобильная версия