diff options
| author | jerome <jerome@xlinfo.fr> | 2025-02-05 18:52:51 +0100 |
|---|---|---|
| committer | jerome <jerome@xlinfo.fr> | 2025-02-05 18:52:51 +0100 |
| commit | 7442f7543946901960151c340a2a9f2e6a0f106d (patch) | |
| tree | 1eda00fced049a638edd1c7a199a4081b67b4349 /libvirt.tf | |
| parent | 2a485c2921146c76023e8dabbaa6d4bedee1aa7b (diff) | |
| download | kvm-multi-7442f7543946901960151c340a2a9f2e6a0f106d.tar.gz kvm-multi-7442f7543946901960151c340a2a9f2e6a0f106d.zip | |
mkpasswd
Diffstat (limited to 'libvirt.tf')
| -rw-r--r-- | libvirt.tf | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -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 } + + |
