wireguard-setup/packer/sources.pkr.hcl

50 lines
1.1 KiB
HCL
Raw Normal View History

2020-01-29 20:46:09 +01:00
source "hcloud" "main" {
2020-04-24 00:15:12 +02:00
image = "ubuntu-20.04"
2020-02-06 19:55:17 +01:00
server_name = "wireguard-{{timestamp}}"
2020-01-29 20:46:09 +01:00
server_type = "cx11"
location = "fsn1"
snapshot_name = "wireguard-{{timestamp}}"
2020-05-28 23:42:06 +02:00
snapshot_labels = {
2020-01-29 20:46:09 +01:00
service = "wireguard"
}
user_data_file = "./hetzner/seed/user-data"
2020-01-29 20:46:09 +01:00
ssh_port = "22"
ssh_username = "root"
ssh_timeout = "10m"
}
source "qemu" "main" {
2020-04-24 00:15:12 +02:00
iso_url = "https://cloud-images.ubuntu.com/daily/server/focal/current/focal-server-cloudimg-amd64.img"
2020-06-11 19:39:38 +02:00
iso_checksum = "file:https://cloud-images.ubuntu.com/daily/server/focal/current/SHA256SUMS"
2020-01-29 20:46:09 +01:00
disk_image = true
vm_name = "wireguard.qcow2"
2020-02-06 19:55:17 +01:00
http_directory = "./qemu/http/"
output_directory = "./qemu/dist/"
2020-01-29 20:46:09 +01:00
accelerator = "kvm"
cpus = 1
memory = 512
headless = true
2020-02-06 19:55:17 +01:00
qemuargs = [
["-smbios", "type=1,serial=ds=nocloud-net;s=http://{{.HTTPIP}}:{{.HTTPPort}}/seed/"]
]
2020-01-29 20:46:09 +01:00
net_device = "virtio-net"
format = "qcow2"
disk_size = "4G"
disk_interface = "virtio"
disk_compression = false
ssh_port = "22"
ssh_username = "root"
ssh_password = "toor"
ssh_timeout = "10m"
shutdown_command = "shutdown -P now"
}