add option to fix MAC address of VM
create atlas VM
This commit is contained in:
parent
d5d6b0d7cc
commit
deb87e4da3
4 changed files with 43 additions and 7 deletions
|
@ -3,6 +3,12 @@ hostname: "${hostname}"
|
|||
manage_etc_hosts: true
|
||||
disable_root: false
|
||||
|
||||
chpasswd:
|
||||
list: |
|
||||
root:root
|
||||
expire: False
|
||||
ssh_pwauth: true
|
||||
|
||||
ssh_authorized_keys:
|
||||
- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOodpLr+FDRyKyHjucHizNLVFHZ5AQmE9GmxMnOsSoaw pimkunis@thinkpadpim"
|
||||
- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINUZp4BCxf7uLa1QWonx/Crf8tYZ5MKIZ+EuaBa82LrV user@user-laptop"
|
||||
|
|
|
@ -42,6 +42,7 @@ resource "libvirt_domain" "main" {
|
|||
network_interface {
|
||||
bridge = "bridgedmz"
|
||||
hostname = var.name
|
||||
mac = var.mac
|
||||
}
|
||||
|
||||
cloudinit = libvirt_cloudinit_disk.main.id
|
||||
|
|
|
@ -11,3 +11,9 @@ variable "storage" {
|
|||
type = number
|
||||
description = "In GiB"
|
||||
}
|
||||
|
||||
variable "mac" {
|
||||
type = string
|
||||
description = "MAC address"
|
||||
default = null
|
||||
}
|
||||
|
|
Reference in a new issue