summaryrefslogtreecommitdiff
path: root/tofu/ansible
diff options
context:
space:
mode:
Diffstat (limited to 'tofu/ansible')
-rw-r--r--tofu/ansible/main.tf21
1 files changed, 21 insertions, 0 deletions
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"
+ ]
+ }
}