Change from QCow2 to Raw images Update boot options for better outputs Add SSH host key acceptance files Change Ubuntu builder to Ubuntu 22
67 lines
1.1 KiB
HCL
67 lines
1.1 KiB
HCL
variable "iso" {
|
|
type = map(string)
|
|
description = "A map containing the URL and checksum for the ISO file"
|
|
}
|
|
|
|
variable "distro" {
|
|
type = string
|
|
default = "unknown"
|
|
}
|
|
|
|
variable "arch" {
|
|
type = string
|
|
default = "x86_64"
|
|
}
|
|
|
|
variable "version" {
|
|
type = string
|
|
description = "The distro version being specified"
|
|
}
|
|
|
|
variable "boot_wait" {
|
|
type = string
|
|
default = "15s"
|
|
description = "Length of time to wait before entering boot commands"
|
|
}
|
|
|
|
variable "boot_command" {
|
|
type = list(string)
|
|
default = []
|
|
}
|
|
|
|
variable "shutdown_command" {
|
|
type = string
|
|
default = "sudo systemctl poweroff"
|
|
}
|
|
|
|
variable "headless" {
|
|
type = bool
|
|
default = true
|
|
}
|
|
|
|
variable "vagrant_cloud_token" {
|
|
type = string
|
|
default = env("VAGRANT_CLOUD_TOKEN")
|
|
}
|
|
|
|
locals {
|
|
name = "${var.distro}-${var.version}-${var.arch}"
|
|
build = formatdate("YYYYMMDDhh", timestamp())
|
|
description = templatefile("../README.box.md", {
|
|
distro = var.distro
|
|
arch = var.arch
|
|
version = var.version
|
|
build = local.build
|
|
})
|
|
|
|
cpus = 2
|
|
memory = 2048
|
|
disk_size = 10
|
|
ssh = {
|
|
username = "vagrant"
|
|
password = "vagrant"
|
|
handshake_attempts = 1000
|
|
timeout = "5h50m"
|
|
}
|
|
}
|