Skip to content

Instantly share code, notes, and snippets.

@DVAlexHiggs
Last active October 5, 2020 06:30
Show Gist options
  • Save DVAlexHiggs/03cdbef887736f03dcfe6d1749c18669 to your computer and use it in GitHub Desktop.
Save DVAlexHiggs/03cdbef887736f03dcfe6d1749c18669 to your computer and use it in GitHub Desktop.
{
"builders": [
{
"boot_command": [
"<enter><wait2><enter><wait><f6><esc><wait>",
" autoinstall<wait2> ds=nocloud-net;",
"<wait><enter>"
],
"boot_wait": "3s",
"cpus": 4,
"memory": 4096,
"guest_os_type": "Ubuntu_64",
"headless": false,
"http_directory": "./http",
"iso_checksum": "sha256:443511f6bf12402c12503733059269a2e10dec602916c0a75263e5d990f6bb93",
"iso_url": "https://releases.ubuntu.com/20.04/ubuntu-20.04.1-live-server-amd64.iso",
"name": "ubuntu-2004",
"ssh_timeout": "10000s",
"floppy_files": ["./http/user-data", "./http/meta-data"],
"floppy_label": "cidata",
"ssh_handshake_attempts": "100",
"ssh_username": "ubuntu",
"ssh_password": "ubuntu",
"type": "virtualbox-iso"
}
],
"provisioners": [
{
"inline": [
"ls /"
],
"type": "shell"
}
]
}
#cloud-config
autoinstall:
version: 1
locale: en_GB
keyboard:
layout: en
variant: uk
network:
network:
version: 2
ethernets:
enp0s3:
dhcp4: true
identity:
hostname: ubuntu-server
username: ubuntu
password: $6$E.3LG7StnEURoOWy$PTcyaJyS5HHFExctu5hWd.oH0LapJ9gXzUd62QfVDjza4rfrEy61NVLmlGE40R7eSBvWBkISvRabc2y0NQ/sy0
ssh:
install-server: yes
user-data:
disable_root: false
late-commands:
- 'sed -i "s/dhcp4: true/&\n dhcp-identifier: mac/" /target/etc/netplan/00-installer-config.yaml'
- echo 'ubuntu ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/ubuntu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment