forked from elasticdog/packer-arch
-
Notifications
You must be signed in to change notification settings - Fork 1
/
template.json
61 lines (61 loc) · 1.7 KB
/
template.json
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
{
"variables": {
"mirror": "http://ftp.tku.edu.tw/Linux/ArchLinux",
"password": "archlinux"
},
"builders": [
{
"type": "virtualbox-iso",
"vboxmanage": [
[ "modifyvm", "{{.Name}}", "--memory", "1024" ],
[ "modifyvm", "{{.Name}}", "--cpus", "1" ]
],
"virtualbox_version_file": ".vbox_version",
"vm_name": "archlinux-2015-01-01",
"iso_url": "{{ user `mirror` }}/iso/2015.01.01/archlinux-2015.01.01-dual.iso",
"iso_checksum": "a8344dde2e9a22e6a66d10ee016818c1491a9054",
"iso_checksum_type": "sha1",
"guest_os_type": "ArchLinux_64",
"guest_additions_mode": "disable",
"http_directory": ".",
"boot_wait": "5s",
"boot_command": [
"<enter><wait10><wait10>",
"echo 'root:{{ user `password` }}' | chpasswd<enter>",
"ssh-keygen -A<enter><wait>",
"systemctl reenable sshd.service<enter>",
"systemctl start sshd.service<enter>"
],
"disk_size": 20480,
"hard_drive_interface": "sata",
"ssh_port": 22,
"ssh_username": "root",
"ssh_password": "{{ user `password` }}",
"shutdown_command": "systemctl poweroff"
}
],
"provisioners": [
{
"type": "shell",
"environment_vars": [
"MIRROR={{ user `mirror` }}",
"PW={{ user `password` }}"
],
"execute_command": "{{.Vars}} sh -x {{.Path}}",
"scripts": [
"scripts/10-disk.sh",
"scripts/20-base.sh",
"scripts/25-packages.sh",
"scripts/30-bootstrap.sh",
"scripts/90-cleanup.sh"
]
}
],
"post-processors": [
{
"type": "vagrant",
"compression_level": "9",
"output": "archlinux.box"
}
]
}