aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hcloud-snapshot/main.pkr.hcl2
-rw-r--r--hcloud-snapshot/snapshot.pkr.hcl22
-rw-r--r--hcloud-snapshot/variables.pkr.hcl2
-rw-r--r--openbsd-image/main.pkr.hcl2
-rw-r--r--openbsd-image/openbsd-amd64.pkr.hcl44
-rw-r--r--openbsd-image/openbsd-arm64.pkr.hcl36
-rw-r--r--openbsd-image/variables.pkr.hcl2
7 files changed, 55 insertions, 55 deletions
diff --git a/hcloud-snapshot/main.pkr.hcl b/hcloud-snapshot/main.pkr.hcl
index 920eeae..a78dd73 100644
--- a/hcloud-snapshot/main.pkr.hcl
+++ b/hcloud-snapshot/main.pkr.hcl
@@ -1,6 +1,6 @@
packer {
required_plugins {
- hcloud = { source = "github.com/hetznercloud/hcloud", version = "~> 1" }
+ hcloud = { source = "github.com/hetznercloud/hcloud", version = "~> 1" }
}
}
diff --git a/hcloud-snapshot/snapshot.pkr.hcl b/hcloud-snapshot/snapshot.pkr.hcl
index ba6376f..dd19f27 100644
--- a/hcloud-snapshot/snapshot.pkr.hcl
+++ b/hcloud-snapshot/snapshot.pkr.hcl
@@ -1,15 +1,15 @@
source "hcloud" "openbsd" {
- token = var.hcloud_token
- rescue = "linux64"
- image = "debian-13"
- server_type = "cx23"
- location = "nbg1"
- ssh_username = "root"
- ssh_keys = [var.ssh_key]
- snapshot_name = "openbsd-${var.version}-${var.arch}"
+ token = var.hcloud_token
+ rescue = "linux64"
+ image = "debian-13"
+ server_type = "cx23"
+ location = "nbg1"
+ ssh_username = "root"
+ ssh_keys = [var.ssh_key]
+ snapshot_name = "openbsd-${var.version}-${var.arch}"
snapshot_labels = {
- "os": "openbsd",
- "version": var.version,
- "arch": var.arch,
+ "os" : "openbsd",
+ "version" : var.version,
+ "arch" : var.arch,
}
}
diff --git a/hcloud-snapshot/variables.pkr.hcl b/hcloud-snapshot/variables.pkr.hcl
index a02e433..5aa8be1 100644
--- a/hcloud-snapshot/variables.pkr.hcl
+++ b/hcloud-snapshot/variables.pkr.hcl
@@ -19,7 +19,7 @@ variable "version" {
}
variable "arch" {
- type = string
+ type = string
validation {
condition = contains(["amd64", "arm64"], var.arch)
error_message = "The arch must be one of: amd64, arm64."
diff --git a/openbsd-image/main.pkr.hcl b/openbsd-image/main.pkr.hcl
index 43d01dd..2728e1f 100644
--- a/openbsd-image/main.pkr.hcl
+++ b/openbsd-image/main.pkr.hcl
@@ -13,7 +13,7 @@ build {
}
provisioner "shell" {
- script = "scripts/setup.sh"
+ script = "scripts/setup.sh"
environment_vars = ["ADMIN_USER=${var.admin_user}"]
}
diff --git a/openbsd-image/openbsd-amd64.pkr.hcl b/openbsd-image/openbsd-amd64.pkr.hcl
index e19b208..7cbb24b 100644
--- a/openbsd-image/openbsd-amd64.pkr.hcl
+++ b/openbsd-image/openbsd-amd64.pkr.hcl
@@ -1,21 +1,21 @@
source "qemu" "openbsd-amd64" {
- vm_name = "openbsd-${var.version}-amd64.raw"
- iso_url = "${var.mirror}/pub/OpenBSD/${var.version}/${var.arch}/install${local.version_short}.iso"
- iso_checksum = "file:${var.mirror}/pub/OpenBSD/${var.version}/${var.arch}/SHA256"
- output_directory = "build"
- qemu_binary = "qemu-system-x86_64"
- machine_type = "q35"
- cpu_model = "max"
- accelerator = "tcg"
- cpus = var.cpus
- memory = var.memory
- disk_interface = "virtio"
- disk_size = "${var.disk_size}G"
- disk_compression = true
- format = "raw"
- ssh_username = "root"
- ssh_password = local.root_password
- ssh_timeout = "30m"
+ vm_name = "openbsd-${var.version}-amd64.raw"
+ iso_url = "${var.mirror}/pub/OpenBSD/${var.version}/${var.arch}/install${local.version_short}.iso"
+ iso_checksum = "file:${var.mirror}/pub/OpenBSD/${var.version}/${var.arch}/SHA256"
+ output_directory = "build"
+ qemu_binary = "qemu-system-x86_64"
+ machine_type = "q35"
+ cpu_model = "max"
+ accelerator = "tcg"
+ cpus = var.cpus
+ memory = var.memory
+ disk_interface = "virtio"
+ disk_size = "${var.disk_size}G"
+ disk_compression = true
+ format = "raw"
+ ssh_username = "root"
+ ssh_password = local.root_password
+ ssh_timeout = "30m"
http_port_min = local.http_port
http_port_max = local.http_port
@@ -38,13 +38,13 @@ source "qemu" "openbsd-amd64" {
var.disklabel_template != "" ? { "/disklabel" = var.disklabel_template } : {}
)
- boot_command = [
+ boot_command = [
"<wait>S<enter><wait>",
"autoinstall<enter><wait>",
"http://{{ .HTTPIP }}:{{ .HTTPPort }}/install.conf<enter>",
]
- boot_wait = "20s"
- shutdown_command = "shutdown -p now"
- headless = false
- qemuargs = [["-display", "cocoa"]]
+ boot_wait = "20s"
+ shutdown_command = "shutdown -p now"
+ headless = false
+ qemuargs = [["-display", "cocoa"]]
}
diff --git a/openbsd-image/openbsd-arm64.pkr.hcl b/openbsd-image/openbsd-arm64.pkr.hcl
index b8845ff..3749486 100644
--- a/openbsd-image/openbsd-arm64.pkr.hcl
+++ b/openbsd-image/openbsd-arm64.pkr.hcl
@@ -1,21 +1,21 @@
source "qemu" "openbsd-arm64" {
- vm_name = "openbsd-${var.version}-aarch64.qcow2"
- iso_url = "${var.mirror}/pub/OpenBSD/${var.version}/${var.arch}/install${local.version_short}.iso"
- iso_checksum = "file:${var.mirror}/pub/OpenBSD/${var.version}/${var.arch}/SHA256"
- output_directory = "build"
- qemu_binary = "qemu-system-aarch64"
- machine_type = "virt"
- cpu_model = "host"
- accelerator = "hvf"
- cpus = var.cpus
- memory = var.memory
- disk_interface = "virtio"
- disk_size = "${var.disk_size}G"
- disk_compression = true
- format = "qcow2"
- ssh_username = "root"
- ssh_password = local.root_password
- ssh_timeout = "10m"
+ vm_name = "openbsd-${var.version}-aarch64.qcow2"
+ iso_url = "${var.mirror}/pub/OpenBSD/${var.version}/${var.arch}/install${local.version_short}.iso"
+ iso_checksum = "file:${var.mirror}/pub/OpenBSD/${var.version}/${var.arch}/SHA256"
+ output_directory = "build"
+ qemu_binary = "qemu-system-aarch64"
+ machine_type = "virt"
+ cpu_model = "host"
+ accelerator = "hvf"
+ cpus = var.cpus
+ memory = var.memory
+ disk_interface = "virtio"
+ disk_size = "${var.disk_size}G"
+ disk_compression = true
+ format = "qcow2"
+ ssh_username = "root"
+ ssh_password = local.root_password
+ ssh_timeout = "10m"
http_port_min = local.http_port
http_port_max = local.http_port
@@ -38,7 +38,7 @@ source "qemu" "openbsd-arm64" {
var.disklabel_template != "" ? { "/disklabel" = var.disklabel_template } : {}
)
- boot_command = [
+ boot_command = [
"<wait>S<enter><wait>",
"autoinstall<enter><wait>",
"http://{{ .HTTPIP }}:{{ .HTTPPort }}/install.conf<enter>",
diff --git a/openbsd-image/variables.pkr.hcl b/openbsd-image/variables.pkr.hcl
index 0577253..24fdbd1 100644
--- a/openbsd-image/variables.pkr.hcl
+++ b/openbsd-image/variables.pkr.hcl
@@ -8,7 +8,7 @@ variable "version" {
}
variable "arch" {
- type = string
+ type = string
validation {
condition = contains(["amd64", "arm64"], var.arch)
error_message = "The arch must be one of: amd64, arm64."