diff options
| author | jerome <jerome@xlinfo.fr> | 2025-08-20 22:51:36 +0200 |
|---|---|---|
| committer | jerome <jerome@xlinfo.fr> | 2025-08-20 22:51:36 +0200 |
| commit | aa2610fcfd250a5193ed088c1383b551b9159963 (patch) | |
| tree | d9a69d4184c36559b2c138ae633093e6071c4dd1 /tofu | |
| parent | a5fc3f548f2b4e983f9c4e53432535410464f20c (diff) | |
| download | incus-aa2610fcfd250a5193ed088c1383b551b9159963.tar.gz incus-aa2610fcfd250a5193ed088c1383b551b9159963.zip | |
remote exec
Diffstat (limited to 'tofu')
| -rw-r--r-- | tofu/ansible/main.tf | 21 |
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" + ] + } } |
