-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathubuntu-ci.pkr.hcl
70 lines (56 loc) · 1.33 KB
/
ubuntu-ci.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
variable "proxmox_host_node" {
type = string
default = "pve"
}
variable "proxmox_password" {
type = string
sensitive = true
}
variable "proxmox_source_template" {
type = string
default = "ubuntu-temp"
}
variable "proxmox_template_name" {
type = string
default = "ubuntu-template"
}
variable "proxmox_url" {
type = string
}
variable "proxmox_username" {
type = string
default = "root@pve"
}
variable "proxmox_network_bridge" {
type = string
default = "vmbr0"
}
source "proxmox-clone" "ubuntu" {
insecure_skip_tls_verify = true
full_clone = false
task_timeout = "5m"
template_name = "${var.proxmox_template_name}"
template_description = "Built at ${timestamp()} by Packer"
clone_vm = "${var.proxmox_source_template}"
os = "l26"
cores = "1"
memory = "512"
scsi_controller = "virtio-scsi-pci"
vm_id = "9000"
ssh_username = "packer"
qemu_agent = true
network_adapters {
bridge = "${var.proxmox_network_bridge}"
model = "virtio"
}
node = "${var.proxmox_host_node}"
username = "${var.proxmox_username}"
password = "${var.proxmox_password}"
proxmox_url = "${var.proxmox_url}"
}
build {
sources = ["source.proxmox-clone.ubuntu"]
provisioner "shell" {
script = "bin/bootstrap.sh"
}
}