packer-cn/examples/hcl/linux/variables.alpine.pkr.hcl

57 lines
1.6 KiB
HCL
Raw Normal View History

2020-07-13 06:31:20 -04:00
variable "alpine_password" {
type = string
default = "alpine"
}
locals {
2020-07-14 10:22:23 -04:00
iso_url_alpine_312 = "http://dl-cdn.alpinelinux.org/alpine/v3.12/releases/x86_64/alpine-virt-3.12.0-x86_64.iso"
iso_checksum_url_alpine_312 = "http://dl-cdn.alpinelinux.org/alpine/v3.12/releases/x86_64/alpine-virt-3.12.0-x86_64.iso.sha256"
floppy_files_alpine = [
2020-07-13 06:31:20 -04:00
"${local.http_directory}/alpine-answers",
"${local.http_directory}/alpine-setup.sh"
]
2020-07-14 10:22:23 -04:00
alpine_312_floppy_boot_command = [
2020-07-13 06:31:20 -04:00
"root<enter><wait>",
"mount -t vfat /dev/fd0 /media/floppy<enter><wait>",
"setup-alpine -f /media/floppy/alpine-answers<enter>",
"<wait5>",
"${var.alpine_password}<enter>",
"${var.alpine_password}<enter>",
"<wait5>",
"y<enter>",
"<wait40s>",
"reboot<enter>",
"<wait20s>",
"root<enter>",
"${var.alpine_password}<enter><wait>",
"mount -t vfat /dev/fd0 /media/floppy<enter><wait>",
"/media/floppy/alpine-setup.sh<enter>",
]
2020-07-14 10:22:23 -04:00
floppy_files_alpine_vsphere = [
"${local.http_directory}/alpine-vsphere-answers",
"${local.http_directory}/alpine-setup.sh"
]
alpine_312_floppy_boot_command_vsphere = [
"root<enter><wait1s>",
"mount -t vfat /dev/fd0 /media/floppy<enter><wait1s>",
"setup-alpine -f /media/floppy/alpine-vsphere-answers<enter><wait3s>",
"${var.alpine_password}<enter>",
"${var.alpine_password}<enter>",
2020-07-14 11:04:27 -04:00
"<wait6s>",
2020-07-14 10:22:23 -04:00
"y<enter>",
2020-07-14 11:04:27 -04:00
"<wait12s>",
2020-07-14 10:22:23 -04:00
"reboot<enter>",
2020-07-14 11:04:27 -04:00
"<wait12s>",
2020-07-14 10:22:23 -04:00
"root<enter>",
"${var.alpine_password}<enter><wait>",
"mount -t vfat /dev/fd0 /media/floppy<enter><wait>",
"/media/floppy/alpine-setup.sh<enter>",
2020-07-14 11:04:27 -04:00
"<wait55s>",
2020-07-14 10:22:23 -04:00
]
2020-07-13 06:34:00 -04:00
}