I'm provisioning servers in a bare metal environment that uses vmware to virtualize the machines. In this scenario I need to use alternatives in the use of remote-exec, this happens because I have restrictions. What is the suggestion for me to be able to install programs inside the vm that is being provisioned?
I want to run replace this code:
###exemplo de comando
provisioner "remote-exec" {
inline = [
"id",
"uname -a",
"cat /etc/os-release",
"echo \"machine-id is $(cat /etc/machine-id)\"",
"lsblk -x KNAME -o KNAME,SIZE,TRAN,SUBSYSTEMS,FSTYPE,UUID,LABEL,MODEL,SERIAL",
"mount | grep ^/dev",
"df -h",
]
connection {
type = "ssh"
user = "vagrant"
host = self.default_ip_address
}
}
May be this ssh_resource provider?
To let you know this is not a plugin coming from Hashicorp but from a third-party source.