diff options
| -rw-r--r-- | final/debian.tf | 8 | ||||
| -rw-r--r-- | final/rocky.tf | 8 | ||||
| -rw-r--r-- | 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 = [ |
