Skip to content

Instantly share code, notes, and snippets.

@coltonhughes
Created July 13, 2020 02:21
Show Gist options
  • Save coltonhughes/86648d447fc3ef493ec3f554717b4b03 to your computer and use it in GitHub Desktop.
Save coltonhughes/86648d447fc3ef493ec3f554717b4b03 to your computer and use it in GitHub Desktop.
{
"builders": [
{
"type": "proxmox",
"proxmox_url": "https://{{user `proxmox_url_no_port`}}:8006/api2/json",
"insecure_skip_tls_verify": true,
"username": "{{ user `proxmox_api_user`}}",
"password": "{{ user `proxmox_api_password`}}",
"vm_name": "{{ user `template_name`}}",
"template_description": "{{ user `template_description`}}",
"node": "{{ user `proxmox_node`}}",
"cores": "{{ user `hdwr_cores`}}",
"sockets": "{{ user `hdwr_sockets`}}",
"memory": "{{ user `hdwr_mem`}}",
"os": "l26",
"network_adapters": [
{
"model": "virtio",
"bridge": "vmbr0"
}
],
"disks": [
{
"type": "scsi",
"disk_size": "{{ user `hdwr_disk_size`}}",
"storage_pool": "{{ user `datastore`}}",
"storage_pool_type": "lvm",
"format": "raw",
"cache_mode": "writeback"
}
],
"ssh_timeout": "90m",
"ssh_password": "{{ user `ssh_password` }}",
"ssh_username": "{{ user `ssh_username` }}",
"qemu_agent": true,
"unmount_iso": true,
"iso_file": "{{ user `iso`}}",
"http_directory": "./http",
"boot_wait": "4s",
"boot_command": [
"{{ user `boot_command_prefix` }}",
"/install/vmlinuz ",
"auto ",
"console-setup/ask_detect=false ",
"debconf/frontend=noninteractive ",
"debian-installer={{ user `locale` }} ",
"hostname={{ user `hostname` }} ",
"fb=false ",
"grub-installer/bootdev=/dev/sda<wait> ",
"initrd=/install/initrd.gz ",
"kbd-chooser/method=us ",
"keyboard-configuration/modelcode=SKIP ",
"debian-installer/locale={{ user `locale` }} ",
"noapic ",
"passwd/username={{ user `ssh_username` }} ",
"passwd/user-fullname={{ user `ssh_fullname` }} ",
"passwd/user-password={{ user `ssh_password` }} ",
"passwd/user-password-again={{ user `ssh_password` }} ",
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{ user `preseed.cfg` }} ",
"-- <enter>"
]
}
],
"provisioners": [
{
"type": "ansible",
"playbook_file": "./playbooks/configure_vm.yml"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment