diff options
| author | jerome <jerome@xlinfo.fr> | 2025-08-18 11:22:14 +0200 |
|---|---|---|
| committer | jerome <jerome@xlinfo.fr> | 2025-08-18 11:22:14 +0200 |
| commit | 4293df73e636a3bb9097d4cbe80ae8c194862f6b (patch) | |
| tree | c7cbf89deac7fcbc85850938b7c926778999c9bc /tofu/ansible/main.tf | |
| download | incus-4293df73e636a3bb9097d4cbe80ae8c194862f6b.tar.gz incus-4293df73e636a3bb9097d4cbe80ae8c194862f6b.zip | |
commit initial
Diffstat (limited to 'tofu/ansible/main.tf')
| -rw-r--r-- | tofu/ansible/main.tf | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/tofu/ansible/main.tf b/tofu/ansible/main.tf new file mode 100644 index 0000000..0bbc448 --- /dev/null +++ b/tofu/ansible/main.tf @@ -0,0 +1,37 @@ +terraform { + required_providers { + incus = { + source = "lxc/incus" + version = "0.3.1" + } + } +} + +provider "incus" { + # Configuration options +} + +resource "incus_instance" "debian" { + name = "webserver1" + project = "lab" + image = "images:debian/12/cloud" + wait_for { + type = "ipv4" + } + provisioner "local-exec" { + command = "./local_script ${self.ipv4_address} ${self.name}" + } +} + +resource "incus_instance" "rocky" { + name = "webserver2" + project = "lab" + image = "images:rockylinux/9/cloud" + wait_for { + type = "ipv4" + } + provisioner "local-exec" { + command = "./local_script ${self.ipv4_address} ${self.name}" + } +} + |
