remove root from ssh_args...
because scp does not take the username via -l, so we just re-add it to the commands themselves.
This commit is contained in:
@@ -45,12 +45,12 @@ resource "hcloud_server" "agents" {
|
||||
|
||||
# Issue a reboot command
|
||||
provisioner "local-exec" {
|
||||
command = "ssh ${local.ssh_args} ${self.ipv4_address} '(sleep 2; reboot)&'; sleep 3"
|
||||
command = "ssh ${local.ssh_args} root@${self.ipv4_address} '(sleep 2; reboot)&'; sleep 3"
|
||||
}
|
||||
|
||||
# Wait for MicroOS to reboot and be ready
|
||||
provisioner "local-exec" {
|
||||
command = "until ssh ${local.ssh_args} -o ConnectTimeout=2 ${self.ipv4_address} true; do sleep 1; done"
|
||||
command = "until ssh ${local.ssh_args} -o ConnectTimeout=2 root@${self.ipv4_address} true; do sleep 1; done"
|
||||
}
|
||||
|
||||
# Generating and uploading the angent.conf file
|
||||
|
Reference in New Issue
Block a user