From aa2610fcfd250a5193ed088c1383b551b9159963 Mon Sep 17 00:00:00 2001 From: jerome Date: Wed, 20 Aug 2025 22:51:36 +0200 Subject: remote exec --- tofu/ansible/main.tf | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'tofu/ansible/main.tf') diff --git a/tofu/ansible/main.tf b/tofu/ansible/main.tf index 0bbc448..18a25a2 100644 --- a/tofu/ansible/main.tf +++ b/tofu/ansible/main.tf @@ -21,6 +21,17 @@ resource "incus_instance" "debian" { provisioner "local-exec" { command = "./local_script ${self.ipv4_address} ${self.name}" } + connection { + type = "ssh" + host = self.ipv4_address + #password = "secret" + user = "ansible" + } + provisioner "remote-exec" { + inline = [ + "cloud-init status || true" + ] + } } resource "incus_instance" "rocky" { @@ -33,5 +44,15 @@ resource "incus_instance" "rocky" { provisioner "local-exec" { command = "./local_script ${self.ipv4_address} ${self.name}" } + connection { + type = "ssh" + host = self.ipv4_address + user = "ansible" + } + provisioner "remote-exec" { + inline = [ + "cloud-init status || true" + ] + } } -- cgit v1.2.3