106 lines
4.2 KiB
JSON
106 lines
4.2 KiB
JSON
{
|
|
"builders": [
|
|
{
|
|
"boot_command": [
|
|
"<esc><wait>",
|
|
"<esc><wait>",
|
|
"<enter><wait>",
|
|
"/install/vmlinuz<wait>",
|
|
" auto<wait>",
|
|
" console-setup/ask_detect=false<wait>",
|
|
" console-setup/layoutcode=us<wait>",
|
|
" console-setup/modelcode=pc105<wait>",
|
|
" debconf/frontend=noninteractive<wait>",
|
|
" debian-installer=en_US.UTF-8<wait>",
|
|
" fb=false<wait>",
|
|
" initrd=/install/initrd.gz<wait>",
|
|
" kbd-chooser/method=us<wait>",
|
|
" keyboard-configuration/layout=USA<wait>",
|
|
" keyboard-configuration/variant=USA<wait>",
|
|
" locale=en_US.UTF-8<wait>",
|
|
" netcfg/get_domain=vm<wait>",
|
|
" netcfg/get_hostname=vagrant<wait>",
|
|
" grub-installer/bootdev=/dev/sda<wait>",
|
|
" preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>",
|
|
" -- <wait>",
|
|
"<enter><wait>"
|
|
],
|
|
"boot_wait": "10s",
|
|
"keep_registered": true,
|
|
"remote_datastore": "{{user `esxi_datastore`}}",
|
|
"remote_host": "{{user `esxi_host`}}",
|
|
"remote_username": "{{user `esxi_username`}}",
|
|
"remote_password": "{{user `esxi_password`}}",
|
|
"remote_type": "esx5",
|
|
"vnc_disable_password": true,
|
|
"vnc_port_min": 5900,
|
|
"vnc_port_max": 5980,
|
|
"disk_size": "{{user `disk_size`}}",
|
|
"guest_os_type": "ubuntu-64",
|
|
"http_directory": "{{user `http_directory`}}",
|
|
"iso_checksum": "{{user `iso_checksum`}}",
|
|
"iso_checksum_type": "{{user `iso_checksum_type`}}",
|
|
"iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
|
|
"shutdown_command": "echo 'vagrant' | sudo -S shutdown -P now",
|
|
"ssh_password": "vagrant",
|
|
"ssh_port": 22,
|
|
"ssh_username": "vagrant",
|
|
"pause_before_connecting": "10m",
|
|
"tools_upload_flavor": "linux",
|
|
"type": "vmware-iso",
|
|
"vm_name": "Ubuntu1804",
|
|
"memory": "{{ user `memory` }}",
|
|
"cpus": "{{ user `cpus` }}",
|
|
"vmx_data": {
|
|
"ethernet0.networkName": "{{user `esxi_network_with_dhcp_and_internet` }}",
|
|
"cpuid.coresPerSocket": "1",
|
|
"ethernet0.pciSlotNumber": "32"
|
|
}
|
|
}
|
|
],
|
|
"provisioners": [
|
|
{
|
|
"environment_vars": [
|
|
"HOME_DIR=/home/vagrant"
|
|
],
|
|
"execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E sh -eux '{{.Path}}'",
|
|
"expect_disconnect": true,
|
|
"scripts": [
|
|
"{{template_dir}}/scripts/update.sh",
|
|
"{{template_dir}}/_common/motd.sh",
|
|
"{{template_dir}}/_common/sshd.sh",
|
|
"{{template_dir}}/scripts/networking.sh",
|
|
"{{template_dir}}/scripts/sudoers.sh",
|
|
"{{template_dir}}/scripts/vagrant.sh",
|
|
"{{template_dir}}/scripts/vmware.sh",
|
|
"{{template_dir}}/scripts/cleanup.sh"
|
|
],
|
|
"type": "shell"
|
|
}
|
|
],
|
|
"variables": {
|
|
"box_basename": "ubuntu-18.04",
|
|
"http_directory": "{{template_dir}}/http",
|
|
"build_timestamp": "{{isotime \"20060102150405\"}}",
|
|
"cpus": "2",
|
|
"disk_size": "65536",
|
|
"esxi_datastore": "",
|
|
"esxi_host": "",
|
|
"esxi_username": "",
|
|
"esxi_password": "",
|
|
"headless": "false",
|
|
"guest_additions_url": "",
|
|
"iso_checksum": "e2ecdace33c939527cbc9e8d23576381c493b071107207d2040af72595f8990b",
|
|
"iso_checksum_type": "sha256",
|
|
"iso_name": "ubuntu-18.04.4-server-amd64.iso",
|
|
"memory": "4096",
|
|
"mirror": "http://cdimage.ubuntu.com",
|
|
"mirror_directory": "ubuntu/releases/18.04.4/release",
|
|
"name": "ubuntu-18.04",
|
|
"no_proxy": "{{env `no_proxy`}}",
|
|
"preseed_path": "preseed.cfg",
|
|
"template": "ubuntu-18.04-amd64",
|
|
"version": "TIMESTAMP"
|
|
}
|
|
}
|