summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjerome <jerome@xlinfo.fr>2025-08-21 00:15:54 +0200
committerjerome <jerome@xlinfo.fr>2025-08-21 00:15:54 +0200
commit3f8bd46f6bbf0fdce25bdde8dd0986665a36297b (patch)
treeff593ce91eceef0eef0272f6b8c35a53324dae2c
parent9ac31bb32dd70a751a66a3011c12a241e41ed18b (diff)
downloadincus-3f8bd46f6bbf0fdce25bdde8dd0986665a36297b.tar.gz
incus-3f8bd46f6bbf0fdce25bdde8dd0986665a36297b.zip
private key
-rw-r--r--final/debian.tf8
-rw-r--r--final/rocky.tf8
-rw-r--r--tofu/ansible/main.tf1
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 = [