Allow boostrap with Buster
- add script and Vagrantfile code to preseed salt minion keys - add needed bootstrap_options for Python 3 support - add grains files and populate those of the ldap and web node - add script to fix systemd-networkd setup with Debian libvirt Vagrant images - switch from VirtualBox to libvirt
This commit is contained in:
parent
c82ef85428
commit
f48eb2caf0
15 changed files with 200 additions and 41 deletions
15
scripts/change-vmdebootstrap-default-dhcp.sh
Normal file
15
scripts/change-vmdebootstrap-default-dhcp.sh
Normal file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
debootstrap_network=/etc/systemd/network/99-dhcp.network
|
||||
|
||||
if grep -q '^Name=\\*' "${debootstrap_network}"; then
|
||||
primary_nic=$(ls -1 /sys/class/net | grep -v lo |sort | head -1)
|
||||
sed -i "s/^Name=e\\*/Name=${primary_nic}/" \
|
||||
"${debootstrap_network}"
|
||||
systemctl restart systemd-networkd.service
|
||||
echo "Changed systemd network configuration"
|
||||
else
|
||||
echo "Systemd network configuration has already been changed"
|
||||
fi
|
15
scripts/pregen_keys.sh
Executable file
15
scripts/pregen_keys.sh
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ ! -d salt/keys ]; then
|
||||
mkdir -p salt/keys
|
||||
fi
|
||||
ls -1 salt/grains | while read a; do
|
||||
if [ ! -f salt/keys/$a.pem ]; then
|
||||
openssl genrsa -out salt/keys/$a.pem 2048
|
||||
fi
|
||||
if [ ! -f salt/keys/$a.pub ]; then
|
||||
openssl rsa -in salt/keys/$a.pem -pubout -out salt/keys/$a.pub
|
||||
fi
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue