Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 17 additions & 28 deletions ubuntu2004/box-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,50 +22,39 @@
"type": "shell",
"execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'",
"script": "scripts/cleanup.sh"
},
{
"type": "shell",
"execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'",
"inline_shebang": "#!/bin/bash -e",
"inline": [
"echo 'Resetting SSH port to default!'",
"rm /etc/ssh/sshd_config.d/packer-init.conf"
]
}
],
"builders": [
{
"type": "virtualbox-iso",
"boot_command": [
"<esc><wait>",
"<esc><wait>",
"<enter><wait>",
"/install/vmlinuz",
" auto=true",
" url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg",
" locale=en_US<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<wait>",
" fb=false<wait>",
" initrd=/install/initrd.gz<wait>",
" kbd-chooser/method=us<wait>",
" keyboard-configuration/layout=USA<wait>",
" keyboard-configuration/variant=USA<wait>",
" netcfg/get_domain=vm<wait>",
" netcfg/get_hostname=vagrant<wait>",
" grub-installer/bootdev=/dev/sda<wait>",
" noapic<wait>",
" -- <wait>",
"<enter><wait>"
"<enter><enter><f6><esc><wait> ",
"autoinstall ds=nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/",
"<wait><enter>"
],
"boot_wait": "10s",
"boot_wait": "5s",
"disk_size": 81920,
"guest_os_type": "Ubuntu_64",
"headless": false,
"http_directory": "http",
"iso_urls": [
"iso/focal-legacy-server-amd64.iso",
"http://cdimage.ubuntu.com/ubuntu-legacy-server/releases/20.04/release/ubuntu-20.04-legacy-server-amd64.iso"
"iso/ubuntu-20.04-live-server-amd64.iso",
"https://releases.ubuntu.com/20.04/ubuntu-20.04-live-server-amd64.iso"
],
"iso_checksum_type": "sha256",
"iso_checksum": "36f15879bd9dfd061cd588620a164a82972663fdd148cce1f70d57d314c21b73",
"iso_checksum": "caf3fd69c77c439f162e2ba6040e9c320c4ff0d69aad1340a514319a9264df9f",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_port": 22,
"ssh_port": 2222,
"ssh_wait_timeout": "1800s",
"shutdown_command": "echo 'vagrant'|sudo -S shutdown -P now",
"guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso",
Expand Down
Empty file added ubuntu2004/http/meta-data
Empty file.
40 changes: 0 additions & 40 deletions ubuntu2004/http/preseed.cfg

This file was deleted.

50 changes: 50 additions & 0 deletions ubuntu2004/http/user-data
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#cloud-config
autoinstall:
version: 1
apt:
geoip: true
preserve_sources_list: true
# primary:
# - arches: [amd64, i386]
# uri: http://de.archive.ubuntu.com/ubuntu
# - arches: [default]
# uri: http://ports.ubuntu.com/ubuntu-ports
packages:
- ubuntu-standard
- ubuntu-server
- cryptsetup
- build-essential
- libssl-dev
- libreadline-dev
- zlib1g-dev
- linux-source
- dkms
- nfs-common
- software-properties-common
identity:
hostname: vagrant
password: $6$H6dENrige2G2YwQQ$ip2nRmBQDm5OXtQ.xpxOoq.f32XOuNkHm6KgMiPH7LFcYhbWnEiVS8bGD3UGRDRstnL4nn/0Av8rtaXfPjGMz1
realname: vagrant
username: vagrant
keyboard:
layout: us
variant: ''
locale: en_US
network:
network:
ethernets:
enp0s3:
dhcp4: true
dhcp-identifier: mac
version: 2
ssh:
allow-pw: true
authorized-keys: []
install-server: true
storage:
layout:
name: lvm
late-commands:
- 'sed -i "s/^#*\(send dhcp-client-identifier\).*$/\1 = hardware;/" /target/etc/dhcp/dhclient.conf'
- 'sed -i "s/dhcp4: true/&\n dhcp-identifier: mac/" /target/etc/netplan/00-installer-config.yaml'
- 'echo "Port 2222" > /target/etc/ssh/sshd_config.d/packer-init.conf'