-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.pkr.hcl
32 lines (28 loc) · 931 Bytes
/
main.pkr.hcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
source "vultr" "debian_10" {
api_key = var.vultr_api_key
os_id = var.os_id
plan_id = var.machine_type
region_id = var.region_id
snapshot_description = "${var.description}-${var.condor_image_version}"
ssh_username = "root"
ssh_clear_authorized_keys = var.ssh_clear_authorized_keys
state_timeout = var.state_timeout
}
build {
sources = ["source.vultr.debian_10"]
provisioner "file" {
source = "files/condor-boot.service"
destination = "/etc/systemd/system/condor-boot.service"
}
provisioner "file" {
source = "files/condor-boot.sh"
destination = "/usr/local/bin/condor-boot.sh"
}
provisioner "shell" {
script = "scripts/condor-provision.sh"
environment_vars = [
"CONTAINERD_RELEASE=${var.containerd_release}",
"K8_VERSION=${var.k8_version}"
]
}
}