Move everything off of Ansible
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
dnf -y update
|
||||
|
||||
dnf clean all
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
dnf install -y qemu-guest-agent
|
||||
systemctl start qemu-guest-agent
|
||||
systemctl enable qemu-guest-agent
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
dnf install -y virtualbox-guest-additions
|
||||
systemctl start vboxservice
|
||||
systemctl enable vboxservice
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
dnf install -y open-vm-tools
|
||||
@@ -156,12 +156,7 @@ truncate -s 0 /etc/machine-id
|
||||
sed -i 's,Defaults\\s*requiretty,Defaults !requiretty,' /etc/sudoers
|
||||
echo 'vagrant ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/vagrant-nopasswd
|
||||
sed -i 's/.*UseDNS.*/UseDNS no/' /etc/ssh/sshd_config
|
||||
mkdir -m 0700 -p ~vagrant/.ssh
|
||||
cat > ~vagrant/.ssh/authorized_keys << EOKEYS
|
||||
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key
|
||||
EOKEYS
|
||||
chmod 600 ~vagrant/.ssh/authorized_keys
|
||||
chown -R vagrant:vagrant ~vagrant/.ssh/
|
||||
#'k
|
||||
|
||||
cat > /etc/ssh/sshd_config.d/10-vagrant-insecure-rsa-key.conf <<EOF
|
||||
# For now the vagrant insecure key is an rsa key
|
||||
@@ -169,12 +164,6 @@ cat > /etc/ssh/sshd_config.d/10-vagrant-insecure-rsa-key.conf <<EOF
|
||||
PubkeyAcceptedKeyTypes=+ssh-rsa
|
||||
EOF
|
||||
|
||||
# Further suggestion from @purpleidea (James Shubin) - extend key to root users as well
|
||||
mkdir -m 0700 -p /root/.ssh
|
||||
cp /home/vagrant/.ssh/authorized_keys /root/.ssh/authorized_keys
|
||||
chmod 600 /root/.ssh/authorized_keys
|
||||
chown -R root:root /root/.ssh
|
||||
|
||||
ssh-keygen -A
|
||||
|
||||
%end
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
dnf -y update
|
||||
|
||||
dnf clean all
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
dnf install -y qemu-guest-agent
|
||||
systemctl start qemu-guest-agent
|
||||
systemctl enable qemu-guest-agent
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
dnf install -y virtualbox-guest-additions
|
||||
systemctl start vboxservice
|
||||
systemctl enable vboxservice
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
dnf install -y open-vm-tools
|
||||
@@ -149,12 +149,7 @@ truncate -s 0 /etc/machine-id
|
||||
sed -i 's,Defaults\\s*requiretty,Defaults !requiretty,' /etc/sudoers
|
||||
echo 'vagrant ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/vagrant-nopasswd
|
||||
sed -i 's/.*UseDNS.*/UseDNS no/' /etc/ssh/sshd_config
|
||||
mkdir -m 0700 -p ~vagrant/.ssh
|
||||
cat > ~vagrant/.ssh/authorized_keys << EOKEYS
|
||||
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key
|
||||
EOKEYS
|
||||
chmod 600 ~vagrant/.ssh/authorized_keys
|
||||
chown -R vagrant:vagrant ~vagrant/.ssh/
|
||||
#'
|
||||
|
||||
cat > /etc/ssh/sshd_config.d/10-vagrant-insecure-rsa-key.conf <<EOF
|
||||
# For now the vagrant insecure key is an rsa key
|
||||
@@ -162,12 +157,6 @@ cat > /etc/ssh/sshd_config.d/10-vagrant-insecure-rsa-key.conf <<EOF
|
||||
PubkeyAcceptedKeyTypes=+ssh-rsa
|
||||
EOF
|
||||
|
||||
# Further suggestion from @purpleidea (James Shubin) - extend key to root users as well
|
||||
mkdir -m 0700 -p /root/.ssh
|
||||
cp /home/vagrant/.ssh/authorized_keys /root/.ssh/authorized_keys
|
||||
chmod 600 /root/.ssh/authorized_keys
|
||||
chown -R root:root /root/.ssh
|
||||
|
||||
ssh-keygen -A
|
||||
|
||||
%end
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
dnf -y update
|
||||
|
||||
dnf clean all
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
dnf install -y qemu-guest-agent
|
||||
systemctl start qemu-guest-agent
|
||||
systemctl enable qemu-guest-agent
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
dnf install -y virtualbox-guest-additions
|
||||
systemctl start vboxservice
|
||||
systemctl enable vboxservice
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
dnf install -y open-vm-tools
|
||||
@@ -142,12 +142,7 @@ truncate -s 0 /etc/machine-id
|
||||
sed -i 's,Defaults\\s*requiretty,Defaults !requiretty,' /etc/sudoers
|
||||
echo 'vagrant ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/vagrant-nopasswd
|
||||
sed -i 's/.*UseDNS.*/UseDNS no/' /etc/ssh/sshd_config
|
||||
mkdir -m 0700 -p ~vagrant/.ssh
|
||||
cat > ~vagrant/.ssh/authorized_keys << EOKEYS
|
||||
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key
|
||||
EOKEYS
|
||||
chmod 600 ~vagrant/.ssh/authorized_keys
|
||||
chown -R vagrant:vagrant ~vagrant/.ssh/
|
||||
#'
|
||||
|
||||
cat > /etc/ssh/sshd_config.d/10-vagrant-insecure-rsa-key.conf <<EOF
|
||||
# For now the vagrant insecure key is an rsa key
|
||||
@@ -155,12 +150,6 @@ cat > /etc/ssh/sshd_config.d/10-vagrant-insecure-rsa-key.conf <<EOF
|
||||
PubkeyAcceptedKeyTypes=+ssh-rsa
|
||||
EOF
|
||||
|
||||
# Further suggestion from @purpleidea (James Shubin) - extend key to root users as well
|
||||
mkdir -m 0700 -p /root/.ssh
|
||||
cp /home/vagrant/.ssh/authorized_keys /root/.ssh/authorized_keys
|
||||
chmod 600 /root/.ssh/authorized_keys
|
||||
chown -R root:root /root/.ssh
|
||||
|
||||
ssh-keygen -A
|
||||
|
||||
%end
|
||||
|
||||
Reference in New Issue
Block a user