summaryrefslogtreecommitdiff
path: root/libvirt.tf
diff options
context:
space:
mode:
Diffstat (limited to 'libvirt.tf')
-rw-r--r--libvirt.tf14
1 files changed, 10 insertions, 4 deletions
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
}
+
+