forked from loicfrering/packer-debian-unstable
-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.json
60 lines (57 loc) · 1.68 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
{
"variables": {
"fullname": "Vagrant",
"username": "vagrant",
"password": "vagrant"
},
"builders": [
{
"type": "virtualbox-iso",
"guest_os_type": "Debian_64",
"disk_size": 10000,
"vboxmanage": [
["modifyvm", "{{.Name}}", "--memory", "1024"],
["modifyvm", "{{.Name}}", "--cpus", "2"]
],
"iso_url": "http://d-i.debian.org/daily-images/amd64/daily/netboot/mini.iso",
"iso_checksum": "899a47cec16a488743d053c8f3624a6e",
"iso_url": http://d-i.debian.org/daily-images/amd64/daily/netboot/MD5SUMS,
"iso_checksum_type": "md5",
"http_directory": "http",
"ssh_username": "{{user `username`}}",
"ssh_password": "{{user `password`}}",
"ssh_wait_timeout": "360m",
"shutdown_command": "echo '{{user `password`}}' | sudo -S halt -p",
"headless": true,
"boot_wait": "5s",
"boot_command": [
"<esc><wait>",
"auto url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ",
"passwd/user-fullname={{user `fullname`}} ",
"passwd/username={{user `username`}} ",
"passwd/user-password={{user `password`}} ",
"passwd/user-password-again={{user `password`}} ",
"<enter>"
]
}
],
"provisioners": [
{
"type": "shell",
"scripts": [
"scripts/vagrant.sh",
"scripts/virtualbox.sh",
"scripts/ansible.sh",
"scripts/zerodisk.sh"
],
"execute_command": "echo '{{user `password`}}' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'"
}
],
"post-processors": [
{
"type": "vagrant",
"output": "packer_debian-unstable_{{.Provider}}.box",
"keep_input_artifact": true
}
]
}