You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
2.4 KiB

4 years ago
{
"builders": [
{
"guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso",
"headless": "{{ user `headless` }}",
"http_directory": "{{user `http_directory`}}",
"output_directory": "{{ user `build_directory` }}/packer-{{user `template`}}-virtualbox",
"shutdown_command": "echo 'vagrant' | sudo -S /sbin/halt -h -p",
"source_path": "{{template_dir}}/amazon2.ovf",
"ssh_password": "vagrant",
"ssh_port": 22,
"ssh_timeout": "10000s",
"ssh_username": "vagrant",
"type": "virtualbox-ovf",
"vboxmanage": [
[
"modifyvm",
"{{.Name}}",
"--memory",
"{{ user `memory` }}"
],
[
"modifyvm",
"{{.Name}}",
"--cpus",
"{{ user `cpus` }}"
]
],
"virtualbox_version_file": ".vbox_version",
"vm_name": "{{ user `template` }}"
}
],
"post-processors": [
{
"output": "{{ user `build_directory` }}/{{user `box_basename`}}.{{.Provider}}.box",
"type": "vagrant"
}
],
"provisioners": [
{
"environment_vars": [
"HOME_DIR=/home/vagrant",
"http_proxy={{user `http_proxy`}}",
"https_proxy={{user `https_proxy`}}",
"no_proxy={{user `no_proxy`}}"
],
"execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E sh -eux '{{.Path}}'",
"expect_disconnect": true,
"scripts": [
"{{template_dir}}/scripts/update.sh",
"{{template_dir}}/../_common/motd.sh",
"{{template_dir}}/../_common/sshd.sh",
"{{template_dir}}/scripts/networking.sh",
"{{template_dir}}/../_common/vagrant.sh",
"{{template_dir}}/../_common/virtualbox.sh",
"{{template_dir}}/scripts/cleanup.sh",
"{{template_dir}}/../_common/minimize.sh"
],
"type": "shell"
}
],
"variables": {
"box_basename": "amazon-2",
"build_directory": "../../builds",
"build_timestamp": "{{isotime \"20060102150405\"}}",
"cpus": "2",
"disk_size": "65536",
"git_revision": "__unknown_git_revision__",
"headless": "",
"http_directory": "{{template_dir}}/http",
"http_proxy": "{{env `http_proxy`}}",
"https_proxy": "{{env `https_proxy`}}",
"memory": "1024",
"name": "amazon-2",
"no_proxy": "{{env `no_proxy`}}",
"template": "amazon-2-x86_64",
"version": "TIMESTAMP"
}
}