From 3f8bd46f6bbf0fdce25bdde8dd0986665a36297b Mon Sep 17 00:00:00 2001 From: jerome Date: Thu, 21 Aug 2025 00:15:54 +0200 Subject: private key --- final/debian.tf | 8 +++++--- final/rocky.tf | 8 +++++--- tofu/ansible/main.tf | 1 + 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/final/debian.tf b/final/debian.tf index ebc528e..c7dfe51 100644 --- a/final/debian.tf +++ b/final/debian.tf @@ -9,9 +9,11 @@ resource "incus_instance" "debian" { command = "./local_script ${self.ipv4_address} ${self.name}" } connection { - type = "ssh" - host = self.ipv4_address - user = "ansible" + type = "ssh" + host = self.ipv4_address + user = "ansible" + private_key = file("~/.ssh/id_rsa") + } provisioner "remote-exec" { inline = [ diff --git a/final/rocky.tf b/final/rocky.tf index 2498fe3..5b81b3f 100644 --- a/final/rocky.tf +++ b/final/rocky.tf @@ -9,9 +9,11 @@ resource "incus_instance" "rocky" { command = "./local_script ${self.ipv4_address} ${self.name}" } connection { - type = "ssh" - host = self.ipv4_address - user = "ansible" + type = "ssh" + host = self.ipv4_address + user = "ansible" + private_key = file("~/.ssh/id_rsa") + } provisioner "remote-exec" { inline = [ diff --git a/tofu/ansible/main.tf b/tofu/ansible/main.tf index 18a25a2..d0b029f 100644 --- a/tofu/ansible/main.tf +++ b/tofu/ansible/main.tf @@ -48,6 +48,7 @@ resource "incus_instance" "rocky" { type = "ssh" host = self.ipv4_address user = "ansible" + private_key = file("~/.ssh/id_rsa") } provisioner "remote-exec" { inline = [ -- cgit v1.2.3