{
|
|
"variables": {
|
|
"source_image": null,
|
|
"root_password": null,
|
|
|
|
"boot_wait": "10s",
|
|
"output_directory": "output/unifi/"
|
|
},
|
|
"builders": [
|
|
{
|
|
"type": "virtualbox-ovf",
|
|
"format": "ova",
|
|
|
|
"source_path": "{{user `source_image`}}",
|
|
"checksum_type": "none",
|
|
|
|
"output_directory": "{{user `output_directory`}}",
|
|
|
|
"boot_wait": "{{user `boot_wait`}}",
|
|
"shutdown_command": "echo '{{user `root_password`}}' | sudo -S poweroff",
|
|
|
|
"communicator": "ssh",
|
|
"ssh_username": "root",
|
|
"ssh_password": "{{user `root_password`}}"
|
|
}
|
|
],
|
|
"provisioners": [
|
|
{
|
|
"type": "shell",
|
|
"inline": [
|
|
"apk update",
|
|
"apk add python sudo"
|
|
]
|
|
},
|
|
{
|
|
"type": "ansible",
|
|
"extra_arguments": [],
|
|
"user": "root",
|
|
"playbook_file": "./provisioning/setup.yml"
|
|
}
|
|
]
|
|
}
|