Created
July 13, 2020 14:24
-
-
Save coltonhughes/eb3f85319cede4ba0e7c27d83b048ba5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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` }}", | |
"TEST_VAR={{user `test_var`}}", | |
"/install/vmlinuz ", | |
"auto ", | |
"console-setup/ask_detect=false ", | |
"debconf/frontend=noninteractive ", | |
"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` }} ", | |
"TEST_VAR={{user `test_var`}}" | |
] | |
} | |
], | |
"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