This commit is contained in:
Serge Logvinov
2021-08-17 20:25:49 +03:00
parent 892334981f
commit 2e3856a900

View File

@@ -10,13 +10,13 @@ packer {
variable "hcloud_token" { variable "hcloud_token" {
type = string type = string
default = "${env("HCLOUD_TOKEN")}" default = env("HCLOUD_TOKEN")
sensitive = true sensitive = true
} }
variable "talos_version" { variable "talos_version" {
type = string type = string
default = "v0.11.0" default = "v0.11.4"
} }
source "hcloud" "talos" { source "hcloud" "talos" {
@@ -27,11 +27,11 @@ source "hcloud" "talos" {
server_type = "cx11" server_type = "cx11"
ssh_username = "root" ssh_username = "root"
snapshot_name = "talos system disk" snapshot_name = "talos system disk"
snapshot_labels = { snapshot_labels = {
type = "infra", type = "infra",
os = "talos", os = "talos",
version = "${var.talos_version}", version = "${var.talos_version}",
} }
} }
@@ -41,7 +41,7 @@ build {
inline = [ inline = [
"apt-get install -y wget", "apt-get install -y wget",
"wget -O /tmp/openstack.tar.gz https://github.com/talos-systems/talos/releases/download/${var.talos_version}/openstack-amd64.tar.gz", "wget -O /tmp/openstack.tar.gz https://github.com/talos-systems/talos/releases/download/${var.talos_version}/openstack-amd64.tar.gz",
"cd /tmp && tar xzf /tmp/openstack.tar.gz && dd if=/tmp/disk.raw of=/dev/sda && sync", "tar xOzf /tmp/talos.tar.gz | dd of=/dev/sda && sync",
] ]
} }
} }