forked from gdepuille/vagrant-amzn2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
packer.json
42 lines (39 loc) · 1.03 KB
/
packer.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
{
"variables": {
"compression_level": "6",
"cpus": "2",
"headless": "false",
"memory": "4096",
"ssh_timeout": "60m"
},
"builders": [{
"type": "virtualbox-ovf",
"source_path": "target/amzn2.ova",
"output_directory": "target/{{build_type}}",
"vm_name": "packer-amzn2",
"headless": "{{user `headless`}}",
"ssh_timeout": "{{user `ssh_timeout`}}",
"ssh_username": "vagrant",
"ssh_private_key_file": "vagrant.key",
"shutdown_command": "sudo systemctl poweroff",
"vboxmanage": [
["modifyvm", "{{.Name}}", "--cpus", "{{ user `cpus`}}"],
["modifyvm", "{{.Name}}", "--memory", "{{ user `memory` }}"]
]
}],
"provisioners": [{
"type": "shell",
"scripts": [
"scripts/virtualbox.sh",
"scripts/vagrant.sh",
"scripts/sshd.sh",
"scripts/cleanup.sh",
"scripts/minimize.sh"
]
}],
"post-processors": [{
"type": "vagrant",
"compression_level": "{{user `compression_level`}}",
"output": "target/amzn2-{{.Provider}}.box"
}]
}