Do some better linting (#13)
* Do some better linting * Update names, Packer version, and more * Do not lint on push * More linting and scripting * Cleanup shellcheck lint * Add Packer format check * Fix Packer formatting * Limit to only one * Remove generated HCL files * Only lint checked files * Use pipes instead * Improve attempt to build Actually go back to attempting to build boxes on GitHub. Maybe it will work better with this structure * Change to using environment files * Initialize plugins, first * More verbose usage of the file * Do the output properly this time * PACKER_LOG set to 1 * No need for python3 anymore * Limit to only one result * Choose a specific CPU model * Init separately * Update actions version * Add version outputting * Correct actions version * Try to execute qemu properly * Fix CPU model name * Do not over-subscribe GitHub runners * Try type instead of command to guard runs * Do not write to non-existent folder * Cache packer plugins * Use ~ instead of /home/greg * Try the proper path * Move to intelligent matrix * Set global env path * Add lots of waits for VBoxManage on hosted runners * Add more waits * Add more waits
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
distro = "archlinux"
|
||||
distro = "archlinux"
|
||||
version = "rolling"
|
||||
iso = {
|
||||
url = "http://dfw.mirror.rackspace.com/archlinux/iso/2023.11.01/archlinux-2023.11.01-x86_64.iso"
|
||||
checksum = "477f50617d648e46d6e326549aa56ab92115a29a97f2ca364e944cea06970608"
|
||||
url = "http://dfw.mirror.rackspace.com/archlinux/iso/2023.11.01/archlinux-2023.11.01-x86_64.iso"
|
||||
checksum = "477f50617d648e46d6e326549aa56ab92115a29a97f2ca364e944cea06970608"
|
||||
}
|
||||
boot_command = [
|
||||
"<tab><wait> net.ifnames=0<wait> <wait>bi<wait>osdevnames=0<enter>",
|
||||
"<wait60>", # Wait for system to come up?
|
||||
"curl -o /tmp/install.sh http://{{ .HTTPIP }}:{{ .HTTPPort }}/install.sh<enter>",
|
||||
"<wait60>", # Wait for system to come up?
|
||||
"curl <wait>-o <wait>/tmp/install.sh <wait>http://{{ .HTTPIP }}<wait>:{{ .HTTPPort }}/install.sh<enter>",
|
||||
"<wait5>",
|
||||
"/usr/bin/bash /tmp/install.sh {{ .HTTPPort }} {{ .HTTPIP }}<enter>"
|
||||
"/usr/bin/bash <wait>/tmp/install.sh <wait>{{ .HTTPPort }} <wait>{{ .HTTPIP }}<enter>"
|
||||
]
|
||||
http_directory = "distros/archlinux/rolling/http/"
|
||||
boot_wait = "10s"
|
||||
boot_wait = "10s"
|
||||
|
||||
@@ -3,7 +3,7 @@ set -ex
|
||||
|
||||
pacman -Syyu --noconfirm
|
||||
|
||||
echo << EOF > /etc/ssh/sshd_config.d/00-vagrant_accept_pubkey.conf
|
||||
cat << EOF > /etc/ssh/sshd_config.d/00-vagrant_accept_pubkey.conf
|
||||
UseDNS no
|
||||
PubkeyAcceptedKeyTypes +ssh-rsa
|
||||
EOF
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
distro = "centos-stream"
|
||||
version = "8"
|
||||
iso = {
|
||||
url = "http://mirror.centos.org/centos/8-stream/isos/x86_64/CentOS-Stream-8-x86_64-latest-boot.iso"
|
||||
checksum = "83fb6025b52ba893669575f7df0048b3adc8e66b4d7c19d8f5522651f19150ba"
|
||||
}
|
||||
boot_command = [
|
||||
"<up><tab><wait><bs><bs><bs><bs><bs>",
|
||||
"inst.text inst.ks=cdrom:/ks.cfg console=tty0",
|
||||
"<enter><wait>"
|
||||
]
|
||||
cd_files = [ "distros/centos-stream/8/disc/*" ]
|
||||
@@ -9,7 +9,7 @@ checksums="$(mktemp)"
|
||||
until curl -f -L -o "${checksums}" "http://mirror.centos.org/centos/8-stream/isos/x86_64/CHECKSUM"; do
|
||||
sleep 1
|
||||
done
|
||||
sha="$(cat "${checksums}" | grep latest-boot | grep SHA256 | cut -d' ' -f 4)"
|
||||
sha="$(grep -e latest-boot "${checksums}" | grep SHA256 | cut -d' ' -f 4)"
|
||||
|
||||
cat << HERPDERP > "${name}"
|
||||
distro = "centos-stream"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
packages="gcc make bzip2 kernel-devel elfutils-libelf-devel"
|
||||
dnf install -y ${packages} # Intentionally not quoted
|
||||
packages=(gcc make bzip2 kernel-devel elfutils-libelf-devel)
|
||||
dnf install -y "${packages[@]}"
|
||||
mount -t auto /home/vagrant/VBoxGuestAdditions.iso /mnt
|
||||
/mnt/VBoxLinuxAdditions.run install --nox11 2>&1 | tee /root/vbox_addon_install.log
|
||||
umount /mnt
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
distro = "centos-stream"
|
||||
version = "9"
|
||||
iso = {
|
||||
url = "https://mirror.stream.centos.org/9-stream/BaseOS/x86_64/iso/CentOS-Stream-9-latest-x86_64-boot.iso"
|
||||
checksum = "2553e0812dba592ae4f73a06105eec1a285623c9ae790a5674456eed1ce9dc4c"
|
||||
}
|
||||
boot_command = [
|
||||
"<up><tab><wait><bs><bs><bs><bs><bs>",
|
||||
"inst.text inst.ks=cdrom:/ks.cfg console=tty0",
|
||||
"<enter><wait>"
|
||||
]
|
||||
cd_files = [ "distros/centos-stream/9/disc/*" ]
|
||||
@@ -10,7 +10,7 @@ checksums="$(mktemp)"
|
||||
until curl -f -L -o "${checksums}" "${baseurl}.SHA256SUM"; do
|
||||
sleep 1
|
||||
done
|
||||
sha="$(cat "${checksums}" | awk '/SHA256/ {print $4}')"
|
||||
sha="$(awk '/SHA256/ {print $4}' "${checksums}")"
|
||||
rm "${checksums}"
|
||||
|
||||
cat << HERPDERP > "${name}"
|
||||
@@ -22,7 +22,7 @@ iso = {
|
||||
}
|
||||
boot_command = [
|
||||
"<up><tab><wait><bs><bs><bs><bs><bs>",
|
||||
"inst.text inst.ks=cdrom:/ks.cfg console=tty0",
|
||||
"inst.text <wait>inst.ks=cdrom:/ks.cfg <wait>console=tty0",
|
||||
"<enter><wait>"
|
||||
]
|
||||
cd_files = [ "distros/centos-stream/9/disc/*" ]
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
packages="bzip2 kernel-devel kernel-headers make perl gcc"
|
||||
dnf install -y ${packages} # Intentionally not quoted
|
||||
packages=(bzip2 kernel-devel kernel-headers make perl gcc)
|
||||
dnf install -y "${packages[@]}"
|
||||
mount -t auto /home/vagrant/VBoxGuestAdditions.iso /mnt
|
||||
/mnt/VBoxLinuxAdditions.run install --nox11 2>&1 | tee /root/vbox_addon_install.log
|
||||
umount /mnt
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
distro = "centos"
|
||||
distro = "centos"
|
||||
version = "7"
|
||||
iso = {
|
||||
url = "http://mirror.centos.org/centos/7/isos/x86_64/CentOS-7-x86_64-NetInstall-2009.iso"
|
||||
checksum = "b79079ad71cc3c5ceb3561fff348a1b67ee37f71f4cddfec09480d4589c191d6"
|
||||
url = "http://mirror.centos.org/centos/7/isos/x86_64/CentOS-7-x86_64-NetInstall-2009.iso"
|
||||
checksum = "b79079ad71cc3c5ceb3561fff348a1b67ee37f71f4cddfec09480d4589c191d6"
|
||||
}
|
||||
boot_command = [
|
||||
"<up><tab><wait>",
|
||||
"<bs><bs><bs><bs><bs> inst.ks=cdrom:/ks.cfg console=tty0",
|
||||
"<enter>"
|
||||
]
|
||||
cd_files = [ "distros/centos/7/disc/*" ]
|
||||
cd_files = ["distros/centos/7/disc/*"]
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
packages="bzip2 dkms kernel-devel kernel-headers make perl gcc"
|
||||
yum install -y ${packages} # Intentionally not quoted
|
||||
packages=(bzip2 dkms kernel-devel kernel-headers make perl gcc)
|
||||
yum install -y "${packages[@]}"
|
||||
mount -t auto /home/vagrant/VBoxGuestAdditions.iso /mnt
|
||||
/mnt/VBoxLinuxAdditions.run install 2>&1 | tee /root/vbox_addon_install.log
|
||||
umount /mnt
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
distro = "debian"
|
||||
distro = "debian"
|
||||
version = "10"
|
||||
iso = {
|
||||
url = "https://cdimage.debian.org/cdimage/archive/10.13.0/amd64/iso-cd/debian-10.13.0-amd64-netinst.iso"
|
||||
checksum = "75aa64071060402a594dcf1e14afd669ca0f8bf757b56d4c9c1a31b8f7c8f931"
|
||||
url = "https://cdimage.debian.org/cdimage/archive/10.13.0/amd64/iso-cd/debian-10.13.0-amd64-netinst.iso"
|
||||
checksum = "75aa64071060402a594dcf1e14afd669ca0f8bf757b56d4c9c1a31b8f7c8f931"
|
||||
}
|
||||
boot_command = [
|
||||
"<esc><wait>",
|
||||
"auto ",
|
||||
"DEBIAN_FRONTEND=text ",
|
||||
"preseed/url=http://{{.HTTPIP}}:{{ .HTTPPort }}/preseed.cfg ",
|
||||
"console=tty0 ",
|
||||
"--- net.ifnames=0 biosdevnames=0 ",
|
||||
"<enter>"
|
||||
"<esc><wait>",
|
||||
"auto <wait>",
|
||||
"DEBIAN_FRONTEND=text <wait>",
|
||||
"preseed/url<wait>=http://{{.HTTPIP}}<wait>:{{ .HTTPPort }}/preseed.cfg <wait>",
|
||||
"console=tty0 <wait>",
|
||||
"--- <wait>net.ifnames=0 <wait>biosdevnames=0 <wait>",
|
||||
"<enter>"
|
||||
]
|
||||
http_directory = "distros/debian/10/http/"
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
packages="bzip2 dkms build-essential linux-headers-$(uname -r)"
|
||||
apt install -y ${packages} # Intentionally not quoted
|
||||
packages=(bzip2 dkms build-essential "linux-headers-$(uname -r)")
|
||||
apt install -y "${packages[@]}"
|
||||
mount -t auto /home/vagrant/VBoxGuestAdditions.iso /mnt
|
||||
/mnt/VBoxLinuxAdditions.run install 2>&1 | tee /root/vbox_addon_install.log
|
||||
apt remove -y ${packages} # Also intentionally not quoted
|
||||
apt remove -y "${packages[@]}"
|
||||
umount /mnt
|
||||
rm /home/vagrant/VBoxGuestAdditions.iso
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
distro = "debian"
|
||||
distro = "debian"
|
||||
version = "11"
|
||||
iso = {
|
||||
url = "http://cdimage.debian.org/cdimage/archive/11.8.0/amd64/iso-cd/debian-11.8.0-amd64-netinst.iso"
|
||||
checksum = "d7a74813a734083df30c8d35784926deaa36bc41e5c0766388e9f591ab056b72"
|
||||
url = "http://cdimage.debian.org/cdimage/archive/11.8.0/amd64/iso-cd/debian-11.8.0-amd64-netinst.iso"
|
||||
checksum = "d7a74813a734083df30c8d35784926deaa36bc41e5c0766388e9f591ab056b72"
|
||||
}
|
||||
boot_command = [
|
||||
"<esc><wait>",
|
||||
"auto ",
|
||||
"DEBIAN_FRONTEND=text ",
|
||||
"preseed/url=http://{{.HTTPIP}}:{{ .HTTPPort }}/preseed.cfg ",
|
||||
"console=tty0 ",
|
||||
"--- net.ifnames=0 biosdevnames=0 ",
|
||||
"<enter>"
|
||||
"<esc><wait>",
|
||||
"auto <wait>",
|
||||
"DEBIAN_FRONTEND=text <wait>",
|
||||
"preseed/url<wait>=http://{{.HTTPIP}}<wait>:{{ .HTTPPort }}/preseed.cfg <wait>",
|
||||
"console=tty0 <wait>",
|
||||
"--- <wait>net.ifnames=0 <wait>biosdevnames=0 <wait>",
|
||||
"<enter>"
|
||||
]
|
||||
http_directory = "distros/debian/11/http/"
|
||||
|
||||
@@ -6,7 +6,7 @@ apt autoremove -y
|
||||
apt upgrade -y
|
||||
|
||||
# Configure sshd to be faster
|
||||
echo << EOF > /etc/ssh/sshd_config.d/00-vagrant_accept_pubkey.conf
|
||||
cat << EOF > /etc/ssh/sshd_config.d/00-vagrant_accept_pubkey.conf
|
||||
UseDNS no
|
||||
PubkeyAcceptedKeyTypes +ssh-rsa
|
||||
EOF
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
packages="bzip2 dkms build-essential linux-headers-$(uname -r)"
|
||||
apt install -y ${packages} # Intentionally not quoted
|
||||
packages=(bzip2 dkms build-essential "linux-headers-$(uname -r)")
|
||||
apt install -y "${packages[@]}"
|
||||
mount -t auto /home/vagrant/VBoxGuestAdditions.iso /mnt
|
||||
/mnt/VBoxLinuxAdditions.run install 2>&1 | tee /root/vbox_addon_install.log
|
||||
apt remove -y ${packages} # Also intentionally not quoted
|
||||
apt remove -y "${packages[@]}"
|
||||
umount /mnt
|
||||
rm /home/vagrant/VBoxGuestAdditions.iso
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
distro = "debian"
|
||||
distro = "debian"
|
||||
version = "12"
|
||||
iso = {
|
||||
url = "http://cdimage.debian.org/cdimage/release/12.2.0/amd64/iso-cd/debian-12.2.0-amd64-netinst.iso"
|
||||
checksum = "23ab444503069d9ef681e3028016250289a33cc7bab079259b73100daee0af66"
|
||||
url = "http://cdimage.debian.org/cdimage/release/12.2.0/amd64/iso-cd/debian-12.2.0-amd64-netinst.iso"
|
||||
checksum = "23ab444503069d9ef681e3028016250289a33cc7bab079259b73100daee0af66"
|
||||
}
|
||||
boot_command = [
|
||||
"<esc><wait>",
|
||||
"auto ",
|
||||
"DEBIAN_FRONTEND=text ",
|
||||
"preseed/url=http://{{.HTTPIP}}:{{ .HTTPPort }}/preseed.cfg ",
|
||||
"console=tty0 ",
|
||||
"--- net.ifnames=0 biosdevnames=0 ",
|
||||
"<enter>"
|
||||
"<esc><wait>",
|
||||
"auto <wait>",
|
||||
"DEBIAN_FRONTEND=text <wait>",
|
||||
"preseed/url<wait>=http://{{.HTTPIP}}<wait>:{{ .HTTPPort }}/preseed.cfg <wait>",
|
||||
"console=tty0 <wait>",
|
||||
"--- <wait>net.ifnames=0 <wait>biosdevnames=0 ",
|
||||
"<enter>"
|
||||
]
|
||||
http_directory = "distros/debian/12/http/"
|
||||
|
||||
@@ -6,7 +6,7 @@ apt autoremove -y
|
||||
apt upgrade -y
|
||||
|
||||
# Configure sshd to be faster
|
||||
echo << EOF > /etc/ssh/sshd_config.d/00-vagrant_accept_pubkey.conf
|
||||
cat << EOF > /etc/ssh/sshd_config.d/00-vagrant_accept_pubkey.conf
|
||||
UseDNS no
|
||||
PubkeyAcceptedKeyTypes +ssh-rsa
|
||||
EOF
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
packages="bzip2 dkms build-essential linux-headers-$(uname -r)"
|
||||
apt install -y ${packages} # Intentionally not quoted
|
||||
packages=(bzip2 dkms build-essential "linux-headers-$(uname -r)")
|
||||
apt install -y "${packages[@]}"
|
||||
mount -t auto /home/vagrant/VBoxGuestAdditions.iso /mnt
|
||||
/mnt/VBoxLinuxAdditions.run install 2>&1 | tee /root/vbox_addon_install.log
|
||||
apt remove -y ${packages} # Also intentionally not quoted
|
||||
apt remove -y "${packages[@]}"
|
||||
umount /mnt
|
||||
rm /home/vagrant/VBoxGuestAdditions.iso
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
distro = "debian"
|
||||
distro = "debian"
|
||||
version = "9"
|
||||
iso = {
|
||||
url = "https://cdimage.debian.org/cdimage/archive/9.13.0/amd64/iso-cd/debian-9.13.0-amd64-netinst.iso"
|
||||
checksum = "71c7e9eb292acc880f84605b1ca2b997f25737fe0a43fc9586f61d35cd2eb43b"
|
||||
url = "https://cdimage.debian.org/cdimage/archive/9.13.0/amd64/iso-cd/debian-9.13.0-amd64-netinst.iso"
|
||||
checksum = "71c7e9eb292acc880f84605b1ca2b997f25737fe0a43fc9586f61d35cd2eb43b"
|
||||
}
|
||||
boot_command = [
|
||||
"<esc><wait>",
|
||||
"auto ",
|
||||
"DEBIAN_FRONTEND=text ",
|
||||
"preseed/url=http://{{.HTTPIP}}:{{ .HTTPPort }}/preseed.cfg ",
|
||||
"console=tty0 ",
|
||||
"--- ", # Lines after this are copied to the resulting system?!
|
||||
"biosdevnames=0 ",
|
||||
"net.ifnames=0 ",
|
||||
"<enter>"
|
||||
"<esc><wait>",
|
||||
"auto ",
|
||||
"DEBIAN_FRONTEND=text ",
|
||||
"preseed/url=http://{{.HTTPIP}}:{{ .HTTPPort }}/preseed.cfg ",
|
||||
"console=tty0 ",
|
||||
"--- ", # Lines after this are copied to the resulting system?!
|
||||
"biosdevnames=0 ",
|
||||
"net.ifnames=0 ",
|
||||
"<enter>"
|
||||
]
|
||||
http_directory = "distros/debian/9/http/"
|
||||
|
||||
@@ -4,11 +4,5 @@ set -ex
|
||||
apt update
|
||||
apt upgrade -y
|
||||
|
||||
# Configure sshd to be faster
|
||||
echo << EOF > /etc/ssh/sshd_config.d/00-vagrant_accept_pubkey.conf
|
||||
UseDNS no
|
||||
PubkeyAcceptedKeyTypes +ssh-rsa
|
||||
EOF
|
||||
|
||||
# Clean up after ourselves
|
||||
apt-get clean
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
packages="bzip2 dkms build-essential linux-headers-$(uname -r)"
|
||||
apt install -y ${packages} # Intentionally not quoted
|
||||
packages=(bzip2 dkms build-essential "linux-headers-$(uname -r)")
|
||||
apt install -y "${packages[@]}"
|
||||
mount -t auto /home/vagrant/VBoxGuestAdditions.iso /mnt
|
||||
/mnt/VBoxLinuxAdditions.run install 2>&1 | tee /root/vbox_addon_install.log
|
||||
apt remove -y ${packages} # Also intentionally not quoted
|
||||
apt remove -y "${packages[@]}"
|
||||
umount /mnt
|
||||
rm /home/vagrant/VBoxGuestAdditions.iso
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
distro = "fedora"
|
||||
distro = "fedora"
|
||||
version = "37"
|
||||
iso = {
|
||||
url = "https://download.fedoraproject.org/pub/fedora/linux/releases/37/Server/x86_64/iso/Fedora-Server-dvd-x86_64-37-1.7.iso"
|
||||
checksum = "0a4de5157af47b41a07a53726cd62ffabd04d5c1a4afece5ee7c7a84c1213e4f"
|
||||
url = "https://download.fedoraproject.org/pub/fedora/linux/releases/37/Server/x86_64/iso/Fedora-Server-dvd-x86_64-37-1.7.iso"
|
||||
checksum = "0a4de5157af47b41a07a53726cd62ffabd04d5c1a4afece5ee7c7a84c1213e4f"
|
||||
}
|
||||
boot_command = [
|
||||
"<up>e<down><down><end> ",
|
||||
"net.ifnames=0 biosdevnames=0 inst.ks=cdrom:/x86_64.ks console=tty0<f10>"
|
||||
]
|
||||
cd_files = [
|
||||
"distros/fedora/37/*.ks"
|
||||
"distros/fedora/37/*.ks"
|
||||
]
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
distro = "fedora"
|
||||
distro = "fedora"
|
||||
version = "38"
|
||||
iso = {
|
||||
url = "https://download.fedoraproject.org/pub/fedora/linux/releases/38/Server/x86_64/iso/Fedora-Server-dvd-x86_64-38-1.6.iso"
|
||||
checksum = "66b52d7cb39386644cd740930b0bef0a5a2f2be569328fef6b1f9b3679fdc54d"
|
||||
url = "https://download.fedoraproject.org/pub/fedora/linux/releases/38/Server/x86_64/iso/Fedora-Server-dvd-x86_64-38-1.6.iso"
|
||||
checksum = "66b52d7cb39386644cd740930b0bef0a5a2f2be569328fef6b1f9b3679fdc54d"
|
||||
}
|
||||
boot_command = [
|
||||
"<up>e<down><down><end> ",
|
||||
"net.ifnames=0 biosdevnames=0 inst.ks=cdrom:/x86_64.ks console=tty0<f10>"
|
||||
"<up>e<down><down><end> ",
|
||||
"net.ifnames=0 <wait>biosdevnames=0 <wait>inst.ks=cdrom:/x86_64.ks <wait>console=tty0<f10>"
|
||||
]
|
||||
cd_files = [
|
||||
"distros/fedora/38/*.ks"
|
||||
"distros/fedora/38/*.ks"
|
||||
]
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
distro = "fedora"
|
||||
distro = "fedora"
|
||||
version = "39"
|
||||
iso = {
|
||||
url = "https://download.fedoraproject.org/pub/fedora/linux/releases/39/Server/x86_64/iso/Fedora-Server-dvd-x86_64-39-1.5.iso"
|
||||
checksum = "2755cdff6ac6365c75be60334bf1935ade838fc18de53d4c640a13d3e904f6e9"
|
||||
url = "https://download.fedoraproject.org/pub/fedora/linux/releases/39/Server/x86_64/iso/Fedora-Server-dvd-x86_64-39-1.5.iso"
|
||||
checksum = "2755cdff6ac6365c75be60334bf1935ade838fc18de53d4c640a13d3e904f6e9"
|
||||
}
|
||||
boot_command = [
|
||||
"<up>e<down><down><end> ",
|
||||
"net.ifnames=0 biosdevnames=0 inst.ks=cdrom:/x86_64.ks console=tty0<f10>"
|
||||
"<up>e<down><down><end> ",
|
||||
"net.ifnames=0 biosdevnames=0 inst.ks=cdrom:/x86_64.ks console=tty0<f10>"
|
||||
]
|
||||
cd_files = [
|
||||
"distros/fedora/39/*.ks"
|
||||
"distros/fedora/39/*.ks"
|
||||
]
|
||||
|
||||
@@ -14,16 +14,16 @@ checksums="${tmp}/checksums"
|
||||
|
||||
# First, find the proper URL, since it updates every build
|
||||
curl -L -o "${listing}" "${fedora}"
|
||||
links="$(cat "${listing}" | pup 'a[href*=".iso"] attr{href}' | grep dvd)"
|
||||
iso_name="$(echo "${links}" | grep -e 'iso$')"
|
||||
links="$(pup -f "${listing}" 'a[href*=".iso"] attr{href}' | grep dvd)"
|
||||
iso_name="$(echo "${links}" | grep -e 'iso$' | head -1)"
|
||||
iso="${fedora}${iso_name}"
|
||||
|
||||
# Read the SHA256 sum value
|
||||
sums="$(cat "${listing}" | pup 'a[href*="CHECKSUM"] attr{href}')"
|
||||
sums="$(pup -f "${listing}" 'a[href*="CHECKSUM"] attr{href}' | head -1)"
|
||||
until curl -f -L -o "${checksums}" "${fedora}${sums}"; do
|
||||
sleep 1
|
||||
done
|
||||
sha="$(cat "${checksums}" | grep dvd | grep SHA256 | cut -d' ' -f 4)"
|
||||
sha="$(grep -e dvd "${checksums}" | grep SHA256 | cut -d' ' -f 4)"
|
||||
|
||||
# Write out HCL file
|
||||
cat << EOF > "${name}"
|
||||
|
||||
@@ -18,7 +18,7 @@ curl -L -o "${checksums}" "${base}.sha256"
|
||||
until curl -f -L -o "${checksums}" "${base}.sha256"; do
|
||||
sleep 1
|
||||
done
|
||||
sha="$(cat "${checksums}" | grep minimal | cut -d' ' -f 1)"
|
||||
sha="$(grep -e minimal "${checksums}" | cut -d' ' -f 1)"
|
||||
|
||||
# Write out HCL file
|
||||
cat << EOF > "${name}"
|
||||
|
||||
@@ -18,7 +18,7 @@ curl -L -o "${checksums}" "${base}.sha256"
|
||||
until curl -f -L -o "${checksums}" "${base}.sha256"; do
|
||||
sleep 1
|
||||
done
|
||||
sha="$(cat "${checksums}" | grep minimal | cut -d' ' -f 1)"
|
||||
sha="$(grep -e minimal "${checksums}" | cut -d' ' -f 1)"
|
||||
|
||||
# Write out HCL file
|
||||
cat << EOF > "${name}"
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
distro = "ubuntu"
|
||||
distro = "ubuntu"
|
||||
version = "18.04"
|
||||
iso = {
|
||||
url = "http://cdimage.ubuntu.com/ubuntu/releases/18.04/release/ubuntu-18.04.6-server-amd64.iso"
|
||||
checksum = "f5cbb8104348f0097a8e513b10173a07dbc6684595e331cb06f93f385d0aecf6"
|
||||
url = "http://cdimage.ubuntu.com/ubuntu/releases/18.04/release/ubuntu-18.04.6-server-amd64.iso"
|
||||
checksum = "f5cbb8104348f0097a8e513b10173a07dbc6684595e331cb06f93f385d0aecf6"
|
||||
}
|
||||
boot_command = [
|
||||
"<esc><wait1>",
|
||||
"<f6><esc><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
|
||||
"auto=true priority=critical ",
|
||||
"locale=en_US.UTF-8 ",
|
||||
"DEBIAN_FRONTEND=text ",
|
||||
"preseed/url=http://{{.HTTPIP}}:{{.HTTPPort}}/preseed.cfg ",
|
||||
"fsck.mode=skip ",
|
||||
"console=tty0 ",
|
||||
"--- net.ifnames=0 biosdevnames=0 ",
|
||||
"<enter><wait1>"
|
||||
"<esc><wait1>",
|
||||
"<f6><esc><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
|
||||
"auto=true priority=critical ",
|
||||
"locale=en_US.UTF-8 ",
|
||||
"DEBIAN_FRONTEND=text ",
|
||||
"preseed/url=http://{{.HTTPIP}}:{{.HTTPPort}}/preseed.cfg ",
|
||||
"fsck.mode=skip ",
|
||||
"console=tty0 ",
|
||||
"--- net.ifnames=0 biosdevnames=0 ",
|
||||
"<enter><wait1>"
|
||||
]
|
||||
http_files = {
|
||||
"/preseed.cfg" = <<HEREDOC
|
||||
"/preseed.cfg" = <<HEREDOC
|
||||
d-i debian-installer/locale string C.UTF-8
|
||||
d-i keyboard-configuration/xkb-keymap select us
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ apt upgrade -y
|
||||
# Do some magic with init
|
||||
sed -i -E -e 's,^(ACTIVE_CONSOLES="/dev/tty).*",\11,' /etc/default/console-setup
|
||||
|
||||
echo << EOF > /etc/ssh/sshd_config.d/00-vagrant_accept_pubkey.conf
|
||||
cat << EOF > /etc/ssh/sshd_config.d/00-vagrant_accept_pubkey.conf
|
||||
UseDNS no
|
||||
PubkeyAcceptedKeyTypes +ssh-rsa
|
||||
EOF
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
distro = "ubuntu"
|
||||
distro = "ubuntu"
|
||||
version = "20.04"
|
||||
iso = {
|
||||
url = "https://releases.ubuntu.com/20.04/ubuntu-20.04.6-live-server-amd64.iso"
|
||||
checksum = "b8f31413336b9393ad5d8ef0282717b2ab19f007df2e9ed5196c13d8f9153c8b"
|
||||
url = "https://releases.ubuntu.com/20.04/ubuntu-20.04.6-live-server-amd64.iso"
|
||||
checksum = "b8f31413336b9393ad5d8ef0282717b2ab19f007df2e9ed5196c13d8f9153c8b"
|
||||
}
|
||||
boot_wait = "3s"
|
||||
boot_command = [
|
||||
"<enter><enter><wait1><f6><esc><wait><bs><bs><bs><bs>",
|
||||
"console=tty0 ",
|
||||
"fsck.mode=skip ",
|
||||
"locale=en_US ",
|
||||
"auto=true ",
|
||||
"priority=critical ",
|
||||
"autoinstall ds=nocloud<enter><wait>"
|
||||
"<enter><enter><wait1><f6><esc><wait><bs><bs><bs><bs>",
|
||||
"console=tty0 ",
|
||||
"fsck.mode=skip ",
|
||||
"locale=en_US ",
|
||||
"auto=true ",
|
||||
"priority=critical ",
|
||||
"autoinstall ds=nocloud<enter><wait>"
|
||||
]
|
||||
cd_files = [
|
||||
"distros/ubuntu/20.04/disc/*"
|
||||
"distros/ubuntu/20.04/disc/*"
|
||||
]
|
||||
|
||||
@@ -10,7 +10,7 @@ apt upgrade -y
|
||||
sed -i -E -e 's,^(ACTIVE_CONSOLES="/dev/tty).*",\11,' /etc/default/console-setup
|
||||
|
||||
# Make sshd faster
|
||||
echo << EOF > /etc/ssh/sshd_config.d/00-vagrant_accept_pubkey.conf
|
||||
cat << EOF > /etc/ssh/sshd_config.d/00-vagrant_accept_pubkey.conf
|
||||
UseDNS no
|
||||
PubkeyAcceptedKeyTypes +ssh-rsa
|
||||
EOF
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
distro = "ubuntu"
|
||||
distro = "ubuntu"
|
||||
version = "22.04"
|
||||
iso = {
|
||||
url = "https://releases.ubuntu.com/22.04/ubuntu-22.04.3-live-server-amd64.iso"
|
||||
checksum = "a4acfda10b18da50e2ec50ccaf860d7f20b389df8765611142305c0e911d16fd"
|
||||
url = "https://releases.ubuntu.com/22.04/ubuntu-22.04.3-live-server-amd64.iso"
|
||||
checksum = "a4acfda10b18da50e2ec50ccaf860d7f20b389df8765611142305c0e911d16fd"
|
||||
}
|
||||
boot_command = [
|
||||
"e<down><down><down><end><bs><bs><bs>",
|
||||
"console=tty0 ",
|
||||
"fsck.mode=skip ",
|
||||
"locale=en_US ",
|
||||
"auto=true ",
|
||||
"priority=critical ",
|
||||
"autoinstall",
|
||||
"<F10>",
|
||||
"e<down><down><down><end><bs><bs><bs>",
|
||||
"console=tty0 <wait>",
|
||||
"fsck.mode=skip <wait>",
|
||||
"locale=en_US <wait>",
|
||||
"auto=true <wait>",
|
||||
"priority=<wait>critical <wait>",
|
||||
"autoinstall<wait>",
|
||||
"<F10>",
|
||||
]
|
||||
cd_files = [
|
||||
"distros/ubuntu/22.04/disc/*"
|
||||
"distros/ubuntu/22.04/disc/*"
|
||||
]
|
||||
|
||||
@@ -10,7 +10,7 @@ apt upgrade -y
|
||||
sed -i -E -e 's,^(ACTIVE_CONSOLES="/dev/tty).*",\11,' /etc/default/console-setup
|
||||
|
||||
# Make sshd faster
|
||||
echo << EOF > /etc/ssh/sshd_config.d/00-vagrant_accept_pubkey.conf
|
||||
cat << EOF > /etc/ssh/sshd_config.d/00-vagrant_accept_pubkey.conf
|
||||
UseDNS no
|
||||
PubkeyAcceptedKeyTypes +ssh-rsa
|
||||
EOF
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
distro = "ubuntu"
|
||||
distro = "ubuntu"
|
||||
version = "23.10"
|
||||
iso = {
|
||||
url = "http://releases.ubuntu.com/23.10/ubuntu-23.10-live-server-amd64.iso"
|
||||
checksum = "d2fb80d9ce77511ed500bcc1f813e6f676d4a3577009dfebce24269ca23346a5"
|
||||
url = "http://releases.ubuntu.com/23.10/ubuntu-23.10-live-server-amd64.iso"
|
||||
checksum = "d2fb80d9ce77511ed500bcc1f813e6f676d4a3577009dfebce24269ca23346a5"
|
||||
}
|
||||
boot_command = [
|
||||
"e<down><down><down><end><bs><bs><bs>",
|
||||
"console=tty0 ",
|
||||
"fsck.mode=skip ",
|
||||
"locale=en_US ",
|
||||
"auto=true ",
|
||||
"priority=critical ",
|
||||
"autoinstall",
|
||||
"<F10>",
|
||||
"e<down><down><down><end><bs><bs><bs>",
|
||||
"console=tty0 <wait>",
|
||||
"fsck.mode=skip <wait>",
|
||||
"locale=en_US <wait>",
|
||||
"auto=true <wait>",
|
||||
"priority=critical <wait>",
|
||||
"autoinstall<wait>",
|
||||
"<F10>",
|
||||
]
|
||||
cd_files = [
|
||||
"distros/ubuntu/23.10/disc/*"
|
||||
"distros/ubuntu/23.10/disc/*"
|
||||
]
|
||||
|
||||
@@ -10,7 +10,7 @@ apt upgrade -y
|
||||
sed -i -E -e 's,^(ACTIVE_CONSOLES="/dev/tty).*",\11,' /etc/default/console-setup
|
||||
|
||||
# Make sshd faster
|
||||
echo << EOF > /etc/ssh/sshd_config.d/00-vagrant_accept_pubkey.conf
|
||||
cat << EOF > /etc/ssh/sshd_config.d/00-vagrant_accept_pubkey.conf
|
||||
UseDNS no
|
||||
PubkeyAcceptedKeyTypes +ssh-rsa
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user