autostart VM
This commit is contained in:
parent
1e75ff6374
commit
76fcb3a013
1 changed files with 8 additions and 7 deletions
15
main.tf
15
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}"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue