diff --git a/.gitignore b/.gitignore index 211b1c5..104b1e3 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ Vagrantfile distros/fedora/rawhide/*.hcl distros/nixos/**/*.hcl distros/centos-stream/**/*.hcl +distros/opensuse/tumbleweed/*.hcl __pycache__ *.pyc diff --git a/distros/opensuse/supports.yml b/distros/opensuse/supports.yml index 88d59b1..db4b95f 100644 --- a/distros/opensuse/supports.yml +++ b/distros/opensuse/supports.yml @@ -1,4 +1,4 @@ -15.5: +15.5: &supp - arch: amd64 provider: qemu - arch: amd64 @@ -6,4 +6,5 @@ - arch: amd64 provider: vmware-iso - arch: amd64 - provider: hyperv-iso \ No newline at end of file + provider: hyperv-iso +tumbleweed: *supp \ No newline at end of file diff --git a/distros/opensuse/tumbleweed/amd64.pkrvars.hcl.sh b/distros/opensuse/tumbleweed/amd64.pkrvars.hcl.sh new file mode 100755 index 0000000..3d8110e --- /dev/null +++ b/distros/opensuse/tumbleweed/amd64.pkrvars.hcl.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +name="${0%.sh}" + +base="https://download.opensuse.org/tumbleweed/iso/openSUSE-Tumbleweed-NET-x86_64-Current.iso" + +# Working directory +tmp="$(mktemp -d)" +checksums="${tmp}/checksums" + +# Read the SHA256 sum value +sums="${base}.sha256" +until curl -f -L -o "${checksums}" "${sums}"; do + sleep 1 +done +sha="$(cut -d' ' -f 1 "${checksums}")" + +cat << EOF > "${name}" +distro = "opensuse" +version = "tumbleweed" +iso = { + url = "${base}" + checksum = "${sha}" +} +boot_command = [ + "e", + "", + " autoyast=http://{{ .HTTPIP }}:{{ .HTTPPort }}/autoinst.xml textmode=1", + "x" +] +http_directory = "distros/opensuse/tumbleweed/http/" +EOF + +rm -r "${tmp}" \ No newline at end of file diff --git a/distros/opensuse/tumbleweed/finalize.sh b/distros/opensuse/tumbleweed/finalize.sh new file mode 100644 index 0000000..b29f91f --- /dev/null +++ b/distros/opensuse/tumbleweed/finalize.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +set -ex + +zypper clean -a \ No newline at end of file diff --git a/distros/opensuse/tumbleweed/http/autoinst.xml b/distros/opensuse/tumbleweed/http/autoinst.xml new file mode 100644 index 0000000..68f4eec --- /dev/null +++ b/distros/opensuse/tumbleweed/http/autoinst.xml @@ -0,0 +1,123 @@ + + + + + + + false + true + + + + + wheel + vagrant + + + + true + external + + + public + + eth0 + + + ssh + + + + + + + all + + + /boot + 512MiB + + + / + max + + + + + + en_US + + + network_manager + + + + + sshd + + + + + + openssh + sudo + + true + false + + openSUSE + + + + UTC + UTC + + + + root + vagrant + false + + + vagrant + vagrant + false + + + + + + + + + + /etc/sudoers.d/vagrant + + + + 440 + root + + + /home/vagrant/.ssh/authorized_keys + 600 + vagrant + https://raw.githubusercontent.com/hashicorp/vagrant/master/keys/vagrant.pub + + + \ No newline at end of file diff --git a/distros/opensuse/tumbleweed/qemu.sh b/distros/opensuse/tumbleweed/qemu.sh new file mode 100644 index 0000000..8bc20c1 --- /dev/null +++ b/distros/opensuse/tumbleweed/qemu.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +set -ex + +zypper install -y qemu-guest-agent +systemctl start qemu-guest-agent +systemctl enable qemu-guest-agent diff --git a/distros/opensuse/tumbleweed/virtualbox.sh b/distros/opensuse/tumbleweed/virtualbox.sh new file mode 100644 index 0000000..087d718 --- /dev/null +++ b/distros/opensuse/tumbleweed/virtualbox.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +set -ex \ No newline at end of file diff --git a/distros/opensuse/tumbleweed/vmware.sh b/distros/opensuse/tumbleweed/vmware.sh new file mode 100644 index 0000000..4cfad53 --- /dev/null +++ b/distros/opensuse/tumbleweed/vmware.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +set -ex