{ "provisioners": [ { "type": "shell", "scripts": [ "scripts/postinstall.sh", "scripts/vmtools.sh", <%- @scripts.each do |script| -%> "scripts/<%= script %>", <%- end -%> "scripts/purge.sh" ], "execute_command": "echo 'vagrant' | {{ .Vars }} sudo -E -S bash '{{ .Path }}'" } ], "builders": [ { "name": "<%= @name %>", "type": "<%= @provider %>-iso", <%- if @provider == "vmware" -%> "guest_os_type": "ubuntu-64", "tools_upload_flavor": "linux", <%- else -%> "guest_os_type": "Ubuntu_64", <%- end -%> "headless": true, "iso_url": "http://cdimage.ubuntu.com/releases/18.04/release/ubuntu-18.04.1-server-amd64.iso", "iso_checksum": "a5b0ea5918f850124f3d72ef4b85bda82f0fcd02ec721be19c1a6952791c8ee8", "iso_checksum_type": "sha256", "ssh_username": "vagrant", "ssh_password": "vagrant", "ssh_timeout": "15m", "http_directory": "templates/ubuntu", "boot_command": [ "", "", "", "", "/install/vmlinuz noapic ", "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ", "debian-installer=en_US auto locale=en_US kbd-chooser/method=us ", "hostname={{ .Name }} ", "fb=false debconf/frontend=noninteractive ", "keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ", "keyboard-configuration/variant=USA console-setup/ask_detect=false ", "grub-installer/bootdev=/dev/sda ", "initrd=/install/initrd.gz -- " ], "shutdown_command": "echo 'shutdown -P now' > shutdown.sh; echo 'vagrant'|sudo -S sh 'shutdown.sh'" } ], "post-processors": [ { "type": "vagrant" } ] }