From 76fcb3a01399d299b6d29df4000a509ab749f6b0 Mon Sep 17 00:00:00 2001 From: Pim Kunis Date: Fri, 17 Mar 2023 18:12:12 +0100 Subject: [PATCH] autostart VM --- main.tf | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/main.tf b/main.tf index da980d7..e7ced98 100644 --- a/main.tf +++ b/main.tf @@ -33,18 +33,19 @@ resource "libvirt_cloudinit_disk" "cloudinit" { } resource "libvirt_domain" "ubuntu" { - name = "hermes" - memory = 1024 - vcpu = 4 + name = "hermes" + memory = 1024 + vcpu = 4 + autostart = true disk { volume_id = libvirt_volume.main_disk.id } network_interface { - bridge = "dmzbr" - hostname = var.name - mac = "CA:FE:C0:FF:EE:07" + bridge = "dmzbr" + hostname = var.name + mac = "CA:FE:C0:FF:EE:07" } cloudinit = libvirt_cloudinit_disk.cloudinit.id @@ -54,7 +55,7 @@ resource "libvirt_domain" "ubuntu" { environment = { ANSIBLE_HOST_KEY_CHECKING = "False" - ANSIBLE_CONFIG = "${var.ansible_cfg}" + ANSIBLE_CONFIG = "${var.ansible_cfg}" } }