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:
phaer
2022-02-07 13:19:06 +01:00
parent a5914f81e6
commit 1a50ace0d3
4 changed files with 8 additions and 8 deletions

View File

@@ -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