-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebian-template.json
More file actions
77 lines (71 loc) · 2.17 KB
/
debian-template.json
File metadata and controls
77 lines (71 loc) · 2.17 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
{
"variables": {
"fullname": "Vagrant",
"username": "vagrant",
"password": "vagrant",
"version": "7.8.0",
"architecture": "",
"iso_checksum": "",
"iso_checksum_type": "",
"build_dir": "",
"output_dir": "",
"headless": false
},
"builders": [
{
"type": "virtualbox-iso",
"output_directory": "{{user `build_dir`}}/debian-{{user `architecture`}}_VirtualBox",
"guest_os_type": "Debian",
"disk_size": 2000,
"iso_url": "http://cdimage.debian.org/debian-cd/{{user `version`}}/{{user `architecture`}}/iso-cd/debian-{{user `version`}}-{{user `architecture`}}-netinst.iso",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"http_directory": "http",
"ssh_username": "{{user `username`}}",
"ssh_password": "{{user `password`}}",
"ssh_wait_timeout": "1h30m",
"shutdown_command": "echo '{{user `password`}}' | sudo -S halt -p",
"headless": "{{user `headless`}}",
"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/prepare-provisioners.sh",
"scripts/vagrant.sh",
"scripts/virtualbox.sh"
],
"execute_command": "echo '{{user `password`}}' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'"
},
{
"type": "file",
"source": "./provisioners/",
"destination": "/provisioners"
},
{
"type": "shell",
"scripts": [
"scripts/zerodisk.sh"
],
"execute_command": "echo '{{user `password`}}' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'"
}
],
"post-processors": [
{
"type": "vagrant",
"output": "{{user `output_dir`}}/debian-{{user `version`}}-{{user `architecture`}}_{{.Provider}}.box",
"keep_input_artifact": false
}
]
}