Move to all shell scripts
This commit is contained in:
@@ -83,16 +83,13 @@ EOF
|
||||
|
||||
# sshd: disable password authentication and DNS checks
|
||||
ex -s /etc/ssh/sshd_config <<EOF
|
||||
:%substitute/^\(PasswordAuthentication\) yes$/\1 no/
|
||||
:%substitute/^.*\(PasswordAuthentication\) yes$/\1 yes/
|
||||
:%substitute/^#\(UseDNS\) yes$/&\r\1 no/
|
||||
:update
|
||||
:quit
|
||||
EOF
|
||||
cat >>/etc/sysconfig/sshd <<EOF
|
||||
|
||||
echo << EOF > /etc/ssh/sshd_config.d/00-vagrant_accept_pubkey.conf
|
||||
PubkeyAcceptedKeyTypes +ssh-rsa
|
||||
EOF
|
||||
echo PubkeyAcceptedKeyTypes +ssh-rsa >> /etc/ssh/sshd_config
|
||||
|
||||
# Decrease connection time by preventing reverse DNS lookups
|
||||
# (see https://lists.centos.org/pipermail/centos-devel/2016-July/014981.html
|
||||
|
||||
@@ -92,7 +92,7 @@ EOF
|
||||
|
||||
# sshd: disable password authentication and DNS checks
|
||||
ex -s /etc/ssh/sshd_config <<EOF
|
||||
:%substitute/^\(PasswordAuthentication\) yes$/\1 no/
|
||||
:%substitute/^.*\(PasswordAuthentication\) yes$/\1 yes/
|
||||
:%substitute/^#\(UseDNS\) yes$/&\r\1 no/
|
||||
:update
|
||||
:quit
|
||||
|
||||
@@ -5,10 +5,8 @@ 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
|
||||
sed -i -E -e 's,^.*(UseDNS).*$,\1 No,' /etc/ssh/sshd_config
|
||||
echo "PubkeyAcceptedKeyTypes +ssh-rsa" >> /etc/ssh/sshd_config
|
||||
|
||||
# Clean up after ourselves
|
||||
apt-get clean
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
distro = "fedora"
|
||||
version = "rawhide"
|
||||
iso = {
|
||||
url = "https://download.fedoraproject.org/pub/fedora/linux/development/rawhide/Server/x86_64/iso/./Fedora-Server-dvd-x86_64-Rawhide-20230814.n.0.iso"
|
||||
checksum = "e682844d4d61e9e51b5dd98ebabb4738ed3460d02e217125c6f77f9089c87142"
|
||||
url = "https://download.fedoraproject.org/pub/fedora/linux/development/rawhide/Server/x86_64/iso/./Fedora-Server-dvd-x86_64-Rawhide-20230823.n.0.iso"
|
||||
checksum = "4ed35d456b51b2d27cfa083220cc0ac4b593f63db0513d69d79af622711783a6"
|
||||
}
|
||||
boot_command = [
|
||||
"<up>e<down><down><end><bs><bs><bs><bs><bs>",
|
||||
|
||||
@@ -6,4 +6,4 @@
|
||||
- arch: x86_64
|
||||
provider: vmware-iso
|
||||
38: *supp
|
||||
rawhide: []
|
||||
rawhide: *supp
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
sed -i -e 's,#PROVIDER_PLACEHOLDER,guest-agent.nix,' /etc/nixos/configuration.nix
|
||||
sed -i -e 's,#PROVIDER_PLACEHOLDER,./guest-agent.nix,' /etc/nixos/configuration.nix
|
||||
cat << EOF > /etc/nixos/guest-agent.nix
|
||||
{...}:
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
sed -i -e 's,#PROVIDER_PLACEHOLDER,guest-agent.nix,' /etc/nixos/configuration.nix
|
||||
sed -i -e 's,#PROVIDER_PLACEHOLDER,./guest-agent.nix,' /etc/nixos/configuration.nix
|
||||
cat << EOF > /etc/nixos/guest-agent.nix
|
||||
{...}:
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
sed -i -e 's,#PROVIDER_PLACEHOLDER,guest-agent.nix,' /etc/nixos/configuration.nix
|
||||
sed -i -e 's,#PROVIDER_PLACEHOLDER,./guest-agent.nix,' /etc/nixos/configuration.nix
|
||||
cat << EOF > /etc/nixos/guest-agent.nix
|
||||
{...}:
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
apt update
|
||||
apt install -y qemu-guest-agent
|
||||
systemctl start qemu-guest-agent
|
||||
systemctl enable qemu-guest-agent
|
||||
|
||||
Reference in New Issue
Block a user