-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathalpine-3.15.pkrvars.hcl
39 lines (39 loc) · 1.54 KB
/
alpine-3.15.pkrvars.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
# renovate: datasource=custom.alpineLinuxRelease
name = "alpine-3.15-template"
iso_file = "alpine-virt-3.15.11-x86_64.iso"
iso_url = "https://dl-cdn.alpinelinux.org/alpine/v3.15/releases/x86_64/alpine-virt-3.15.11-x86_64.iso"
iso_checksum = "file:https://dl-cdn.alpinelinux.org/alpine/v3.15/releases/x86_64/alpine-virt-3.15.11-x86_64.iso.sha256"
http_directory = "./http/alpine"
boot_command = [
"root<enter><wait>",
"ifconfig eth0 up && udhcpc -i eth0<enter><wait5>",
"wget http://{{ .HTTPIP }}:{{ .HTTPPort }}/answers<enter><wait>",
"setup-alpine -f answers<enter><wait5>",
"packer<enter><wait>",
"packer<enter><wait5>",
"<wait>y<enter><wait5>",
"rc-service sshd stop <enter>",
"mount /dev/vg0/lv_root /mnt<enter>",
"mount --bind /dev/ /mnt/dev<enter>",
"chroot /mnt<enter><wait>",
"echo https://dl-cdn.alpinelinux.org/alpine/v$(cat /etc/alpine-release | cut -d'.' -f1,2)/community/ >> /etc/apk/repositories<enter><wait>",
"apk update<enter><wait>",
"apk upgrade<enter><wait>",
"apk add --no-cache qemu-guest-agent<enter><wait>",
"rc-update add qemu-guest-agent<enter>",
"apk add --no-cache sudo<enter>",
"echo '%wheel ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/wheel<enter>",
"adduser packer -H -D<enter>",
"echo packer:packer | chpasswd<enter>",
"adduser packer wheel<enter>",
"exit<enter>",
"umount /mnt/dev<enter><wait1>",
"umount /mnt<enter><wait1>",
"reboot<enter>"
]
provisioner = [
"apk add --no-cache cloud-init",
"setup-cloud-init",
"passwd -l root",
"deluser --remove-home packer"
]