wireguard-setup/packer/sources.pkr.hcl

75 lines
1.8 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
2021-06-14 22:49:37 +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"
2021-06-14 22:49:37 +02:00
location = "fsn1"
2020-01-29 20:46:09 +01:00
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"
2021-06-14 22:49:37 +02:00
ssh_port = "22"
ssh_username = "root"
ssh_timeout = "10m"
2020-09-29 23:03:50 +02:00
ssh_clear_authorized_keys = true
2020-01-29 20:46:09 +01:00
}
source "digitalocean" "main" {
api_token = var.digitalocean_api_token
2021-06-14 22:49:37 +02:00
image = "ubuntu-20-04-x64"
droplet_name = "wireguard-{{timestamp}}"
2021-06-14 22:49:37 +02:00
size = "s-1vcpu-1gb"
region = "fra1"
snapshot_name = "wireguard-{{timestamp}}"
tags = [
"wireguard"
]
user_data_file = "./digitalocean/seed/user-data"
2021-06-14 22:49:37 +02:00
ssh_port = "22"
ssh_username = "root"
ssh_timeout = "10m"
2020-09-29 23:03:50 +02:00
ssh_clear_authorized_keys = true
}
2020-01-29 20:46:09 +01:00
source "qemu" "main" {
2021-06-14 22:49:37 +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"
2021-06-14 22:49:37 +02:00
disk_image = true
2020-01-29 20:46:09 +01:00
2021-06-14 22:49:37 +02:00
vm_name = "wireguard.qcow2"
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"
2021-06-14 22:49:37 +02:00
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"
2021-06-14 22:49:37 +02:00
format = "qcow2"
disk_size = "4G"
disk_interface = "virtio"
2020-01-29 20:46:09 +01:00
disk_compression = false
2021-06-14 22:49:37 +02:00
ssh_port = "22"
ssh_username = "root"
ssh_password = "toor"
ssh_timeout = "10m"
2020-09-29 23:03:50 +02:00
ssh_clear_authorized_keys = true
2020-01-29 20:46:09 +01:00
shutdown_command = "shutdown -P now"
}