pep-mklive/packer/hcl2/build-vagrant.pkr.hcl

46 lines
1.0 KiB
HCL

build {
name = "vagrant-virtualbox-x86_64"
source "source.virtualbox-iso.x86_64" {
boot_command = [
"<tab><wait>",
"auto autourl=http://{{.HTTPIP}}:{{.HTTPPort}}/x86_64.cfg",
"<enter>"
]
vm_name = "peplinux-x86_64"
output_directory = "vagrant-virtualbox-x86_64"
}
provisioner "shell" {
script = "scripts/vagrant.sh"
execute_command = "echo 'pep' | {{.Vars}} sudo -E -S bash '{{.Path}}'"
}
post-processor "vagrant" {
output = "vagrant-virtualbox-x86_64.box"
}
}
build {
name = "vagrant-virtualbox-x86_64-musl"
source "source.virtualbox-iso.x86_64" {
boot_command = [
"<tab><wait>",
"auto autourl=http://{{.HTTPIP}}:{{.HTTPPort}}/x86_64-musl.cfg",
"<enter>"
]
vm_name = "peplinux-x86_64-musl"
output_directory = "vagrant-virtualbox-x86_64-musl"
}
provisioner "shell" {
script = "scripts/vagrant.sh"
execute_command = "echo 'pep' | {{.Vars}} sudo -E -S bash '{{.Path}}'"
}
post-processor "vagrant" {
output = "vagrant-virtualbox-x86_64-musl.box"
}
}