UniFi Network Controller VM image
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.
 
 

66 lines
1.8 KiB

{
"variables": {
"iso_url": "http://dl-cdn.alpinelinux.org/alpine/v3.9/releases/x86_64/alpine-standard-3.9.3-x86_64.iso",
"iso_checksum": "6e28c5c902ccb6db24596dfb6a1c255c7989d0b9be4e92e87a8eff523201a459",
"iso_checksum_type": "sha256",
"boot_wait": "10s",
"root_password": null,
"ssh_timeout": "60m",
"machine_hostname": "unifi",
"http_directory": "http/",
"output_directory": "output/base/"
},
"builders": [
{
"type": "virtualbox-iso",
"guest_os_type": "Linux_64",
"format": "ova",
"iso_url": "{{user `iso_url`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"http_directory": "{{user `http_directory`}}",
"output_directory": "{{user `output_directory`}}",
"boot_wait": "{{user `boot_wait`}}",
"boot_command": [
"root<enter><wait>",
"ifconfig eth0 up && ",
"udhcpc -i eth0<enter>",
"<wait5>",
"wget http://{{ .HTTPIP }}:{{ .HTTPPort }}/answers<enter><wait>",
"sed -i ",
"-e \"s/:hostname:/{{user `machine_hostname`}}/g\" ",
"answers<enter>",
"sed -i \"s/rc-service \\$svc start/#&/\" /sbin/setup-sshd<enter>",
"setup-alpine -f answers && ",
"mount /dev/sda3 /mnt && ",
"echo 'PermitRootLogin yes' >> /mnt/etc/ssh/sshd_config && ",
"rc-update add acpid && ",
"umount /mnt && ",
"reboot",
"<enter>",
"<wait5>",
"{{user `root_password`}}<enter><wait>",
"{{user `root_password`}}<enter><wait20>",
"y<enter>"
],
"communicator": "ssh",
"ssh_username": "root",
"ssh_password": "{{user `root_password`}}",
"ssh_timeout": "{{user `ssh_timeout`}}"
}
]
}