diff options
Diffstat (limited to 'openbsd-image/openbsd-amd64.pkr.hcl')
| -rw-r--r-- | openbsd-image/openbsd-amd64.pkr.hcl | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/openbsd-image/openbsd-amd64.pkr.hcl b/openbsd-image/openbsd-amd64.pkr.hcl index 2fef98b..e19b208 100644 --- a/openbsd-image/openbsd-amd64.pkr.hcl +++ b/openbsd-image/openbsd-amd64.pkr.hcl @@ -17,18 +17,26 @@ source "qemu" "openbsd-amd64" { ssh_password = local.root_password ssh_timeout = "30m" - http_content = { - "/install.conf" = templatefile("${path.root}/templates/install.conf.pkrtpl.hcl", { - hostname = var.hostname - user = var.admin_user - ssh_key = var.ssh_key - root_password = local.root_password - mirror = var.mirror - version = var.version - version_short = local.version_short - arch = var.arch - }) - } + http_port_min = local.http_port + http_port_max = local.http_port + + http_content = merge( + { + "/install.conf" = templatefile("${path.root}/templates/install.conf.pkrtpl.hcl", { + hostname = var.hostname + user = var.admin_user + ssh_key = var.ssh_key + root_password = local.root_password + mirror = var.mirror + version = var.version + version_short = local.version_short + arch = var.arch + disklabel_template = var.disklabel_template + http_port = local.http_port + }) + }, + var.disklabel_template != "" ? { "/disklabel" = var.disklabel_template } : {} + ) boot_command = [ "<wait>S<enter><wait>", |