Created
November 16, 2018 19:56
-
-
Save lordcirth/7a815277d4da94869fb533e8bf893525 to your computer and use it in GitHub Desktop.
Packer Ubuntu
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": "virtualbox-iso", | |
"name": "acm-packer-1", | |
"guest_os_type": "Ubuntu_64", | |
"iso_url": "./ubuntu-18.04.1-server-amd64.iso", | |
"iso_checksum": "a5b0ea5918f850124f3d72ef4b85bda82f0fcd02ec721be19c1a6952791c8ee8", | |
"iso_checksum_type": "sha256", | |
"ssh_username": "packer", | |
"ssh_password": "packer", | |
"ssh_wait_timeout": "10000s", | |
"boot_wait": "5s", | |
"boot_command": | |
[ | |
"<esc><esc><enter><wait>", | |
"/install/vmlinuz noapic ", | |
"debian-installer=en_US auto locale=en_US.UTF-8 kbd-chooser/method=us ", | |
"preseed/file=/floppy/preseed-desktop.cfg ", | |
"hostname=acm-packer ", | |
"fb=false debconf/frontend=noninteractive ", | |
"keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ", | |
"keyboard-configuration/variant=USA console-setup/ask_detect=false ", | |
"passwd/user-fullname=packer ", | |
"passwd/username=packer ", | |
"passwd/user-password=packer ", | |
"passwd/user-password-again=packer ", | |
"initrd=/install/initrd.gz -- <enter>" | |
], | |
"floppy_files": [ | |
"preseed-desktop.cfg" | |
], | |
"shutdown_command": "echo 'packer' | sudo -S shutdown -P now", | |
"vboxmanage": [ | |
[ | |
"modifyvm", "{{.Name}}", "--nictype1", "virtio" | |
], | |
[ | |
"modifyvm", "{{.Name}}", "--memory", "4096" | |
], | |
[ | |
"modifyvm", "{{.Name}}", "--vram", "128" | |
], | |
[ | |
"modifyvm", "{{.Name}}", "--cpus", "2" | |
] | |
] | |
} | |
], | |
"provisioners": [ | |
{ | |
"type": "shell", | |
"inline": ["echo 'packer' | sudo -S -- sh -c 'apt-get update && apt-get dist-upgrade -y'"] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment