-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathfedora-coreos.pkr.hcl
62 lines (54 loc) · 1.21 KB
/
fedora-coreos.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
packer {
required_plugins {
vagrant = {
source = "github.com/hashicorp/vagrant"
version = "~> 1"
}
virtualbox = {
source = "github.com/hashicorp/virtualbox"
version = "~> 1"
}
}
}
variable "ignition_hash" {
type = string
}
variable "ignition_url" {
type = string
}
variable "iso_checksum" {
type = string
}
variable "iso_url" {
type = string
}
variable "raw_url" {
type = string
}
source "virtualbox-iso" "fedora-coreos" {
boot_command = [
"<enter>",
"<wait30s>",
"sudo /usr/bin/coreos-installer install -I ${var.ignition_url} --ignition-hash ${var.ignition_hash} -u ${var.raw_url} /dev/sda",
"<enter>",
"<wait5m>",
"reboot",
"<enter>",
"<wait30s>"
]
boot_wait = "5s"
guest_os_type = "Linux_64"
iso_checksum = "sha256:${var.iso_checksum}"
iso_url = "${var.iso_url}"
memory = 3072
shutdown_command = "sudo /sbin/shutdown -P -h now"
ssh_private_key_file = "id_rsa"
ssh_username = "vagrant"
}
build {
sources = ["source.virtualbox-iso.fedora-coreos"]
post-processor "vagrant" {
compression_level = 9
output = "fedora-coreos.box"
}
}