wireguard-setup/packer/sources.pkr.hcl

72 lines
1.5 KiB
HCL
Raw Normal View History

2020-01-29 20:46:09 +01:00
source "hcloud" "main" {
2020-06-14 21:25:25 +02:00
token = var.hcloud_api_token
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 "digitalocean" "main" {
api_token = var.digitalocean_api_token
image = "ubuntu-20-04-x64"
droplet_name = "wireguard-{{timestamp}}"
size = "s-1vcpu-1gb"
region = "fra1"
snapshot_name = "wireguard-{{timestamp}}"
tags = [
"wireguard"
]
user_data_file = "./digitalocean/seed/user-data"
ssh_port = "22"
ssh_username = "root"
ssh_timeout = "10m"
}
2020-01-29 20:46:09 +01:00
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/"
2020-09-29 23:02:32 +02:00
output_directory = "./dist/qemu/"
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"
}