|
|
- {
- "variables": {
- "memory": "4G",
- "cpus": "2",
-
- "iso_url": "https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-9.8.0-amd64-netinst.iso",
- "iso_checksum": "cc4a6bd50925c1c4af98049060e304494bc9da61eb5eb272c556d67608de14d4e6a4b8bc1c9412a0f810083912e228569f3771ffffa7174538f3e26f45a05245",
- "iso_checksum_type": "sha512",
-
- "boot_wait": "3s",
- "boot_key_interval": "10ms",
-
- "ssh_username": "unifi",
- "ssh_password": "uuunifi",
- "ssh_timeout": "60m",
-
- "machine_hostname": "unifi-controller",
- "machine_domain": "lab.uncomfortably.online",
-
- "http_directory": "http/",
- "preseed_file": "preseed.cfg"
- },
- "builders": [
- {
- "type": "qemu",
- "accelerator": "kvm",
- "qemuargs": [
- [ "-m", "{{ user `memory` }}" ],
- [ "-smp", "cpus={{ user `cpus`}}"]
- ],
-
- "iso_url": "{{user `iso_url`}}",
- "iso_checksum": "{{user `iso_checksum`}}",
- "iso_checksum_type": "{{user `iso_checksum_type`}}",
-
- "http_directory": "{{user `http_directory`}}",
-
- "boot_wait": "{{user `boot_wait`}}",
- "boot_key_interval": "{{user `boot_key_interval`}}",
- "boot_command": [
- "<esc><wait>",
- "install ",
- "auto=true ",
- "url=http://{{.HTTPIP}}:{{.HTTPPort}}/{{user `preseed_file`}} ",
-
- "hostname={{user `machine_hostname`}} ",
- "domain={{user `machine_domain`}} ",
- "interface=auto ",
-
- "passwd/user-fullname={{user `ssh_username`}} ",
- "passwd/username={{user `ssh_username`}} ",
- "passwd/user-password={{user `ssh_password`}} ",
- "passwd/user-password-again={{user `ssh_password`}} ",
-
- "<enter>"
- ],
-
- "communicator": "ssh",
- "ssh_username": "{{user `ssh_username`}}",
- "ssh_password": "{{user `ssh_password`}}",
- "ssh_timeout": "{{user `ssh_timeout`}}"
- }
- ]
- }
|