fix ssh identity...
Newly added ssh commands were missing the flag -i to pass an identity file. This means that those commands use different settings then the provisioners and their connection blocks around them. While adding this parameter, I decided it would be cleanest to add local.ssh_args.
This commit is contained in:
@@ -44,12 +44,12 @@ resource "hcloud_server" "control_planes" {
|
||||
|
||||
# Issue a reboot command
|
||||
provisioner "local-exec" {
|
||||
command = "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -l root ${self.ipv4_address} '(sleep 2; reboot)&'; sleep 3"
|
||||
command = "ssh ${local.ssh_args} ${self.ipv4_address} '(sleep 2; reboot)&'; sleep 3"
|
||||
}
|
||||
|
||||
# Wait for MicroOS to reboot and be ready
|
||||
provisioner "local-exec" {
|
||||
command = "until ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -l root -o ConnectTimeout=2 ${self.ipv4_address} true; do sleep 1; done"
|
||||
command = "until ssh ${local.ssh_args} -o ConnectTimeout=2 ${self.ipv4_address} true; do sleep 1; done"
|
||||
}
|
||||
|
||||
# Generating k3s server config file
|
||||
|
Reference in New Issue
Block a user