From 7442f7543946901960151c340a2a9f2e6a0f106d Mon Sep 17 00:00:00 2001 From: jerome Date: Wed, 5 Feb 2025 18:52:51 +0100 Subject: mkpasswd --- libvirt.tf | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'libvirt.tf') diff --git a/libvirt.tf b/libvirt.tf index d63f72b..64bf161 100644 --- a/libvirt.tf +++ b/libvirt.tf @@ -7,10 +7,10 @@ resource "libvirt_volume" "base" { } resource "libvirt_volume" "image" { - name = "${var.nom}.qcow2" - base_volume_id = libvirt_volume.base.id - pool = "default" - size = 10 * 1024 * 1024 *1024 + name = "${var.nom}.qcow2" + base_volume_id = libvirt_volume.base.id + pool = "default" + size = 10 * 1024 * 1024 * 1024 } # get user data info @@ -64,6 +64,10 @@ resource "libvirt_domain" "vm_domain" { listen_type = "address" autoport = true } + + provisioner "local-exec" { + command = "./script_local ${self.network_interface.0.addresses[0]}" + } } # Output Server IP @@ -71,3 +75,5 @@ resource "libvirt_domain" "vm_domain" { output "ip" { value = libvirt_domain.vm_domain.network_interface.0.addresses } + + -- cgit v1.2.3