update machine images, upgrade salt to 3006 onedir

This commit is contained in:
John Bowdre 2024-02-06 06:53:35 -06:00
parent 1ed83037ad
commit 117095ed5e

68
Vagrantfile vendored
View file

@ -7,18 +7,21 @@ Vagrant.configure("2") do |config|
config.nfs.verify_installed = false config.nfs.verify_installed = false
config.vm.synced_folder ".", "/vagrant", disabled: true config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.define "salt", primary: true do |salt| config.vm.define "salt", primary: true do |salt|
salt.vm.box = "peru/ubuntu-20.04-server-amd64" salt.vm.box = "bento/ubuntu-22.04"
salt.vm.hostname = "salt" salt.vm.hostname = "salt"
salt.vm.network "private_network", ip: "192.168.100.120" salt.vm.network :private_network,
:ip => "192.168.100.120",
:libvirt__dhcp_enabled => false
salt.vm.provider :libvirt do |libvirt| salt.vm.provider :libvirt do |libvirt|
libvirt.memory = 1024 libvirt.memory = 1024
end end
salt.vm.synced_folder 'salt_content/local', '/srv', type: 'rsync' salt.vm.synced_folder 'salt_content/local', '/srv', type: 'rsync'
salt.vm.provision "shell", inline: <<-SHELL salt.vm.provision "shell", inline: <<-SHELL
apt-get update apt-get update
apt-get install curl vim python3-pygit2 -y apt-get install curl vim -y
curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io
sh bootstrap-salt.sh -M -X -U stable 3005 sh bootstrap-salt.sh -M -X -U stable 3006
salt-pip install pygit2
cat << EOF > /etc/salt/master.d/lab.conf cat << EOF > /etc/salt/master.d/lab.conf
auto_accept: True auto_accept: True
file_roots: file_roots:
@ -55,14 +58,19 @@ EOF
SHELL SHELL
end end
config.vm.define "minion01" do |minion01| config.vm.define "minion01" do |minion01|
minion01.vm.box = "peru/ubuntu-20.04-server-amd64" minion01.vm.box = "bento/ubuntu-22.04"
minion01.vm.hostname = "minion01" minion01.vm.hostname = "minion01"
minion01.vm.network "private_network", ip: "192.168.100.121" minion01.vm.network :private_network,
:ip => "192.168.100.121",
:libvirt__dhcp_enabled => false
minion01.vm.provider :libvirt do |libvirt|
libvirt.memory = 1024
end
minion01.vm.provision "shell", inline: <<-SHELL minion01.vm.provision "shell", inline: <<-SHELL
apt-get update apt-get update
apt-get install curl -y apt-get install curl -y
curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io
sh bootstrap-salt.sh -A 192.168.100.120 -U stable 3005 sh bootstrap-salt.sh -A 192.168.100.120 -U stable 3006
cat << EOF > /etc/salt/minion.d/grains.conf cat << EOF > /etc/salt/minion.d/grains.conf
grains: grains:
roles: roles:
@ -72,14 +80,19 @@ EOF
SHELL SHELL
end end
config.vm.define "minion02" do |minion02| config.vm.define "minion02" do |minion02|
minion02.vm.box = "debian/bullseye64" minion02.vm.box = "peru/ubuntu-20.04-server-amd64"
minion02.vm.hostname = "minion02" minion02.vm.hostname = "minion02"
minion02.vm.network "private_network", ip: "192.168.100.122" minion02.vm.network :private_network,
:ip => "192.168.100.122",
:libvirt__dhcp_enabled => false
minion02.vm.provider :libvirt do |libvirt|
libvirt.memory = 1024
end
minion02.vm.provision "shell", inline: <<-SHELL minion02.vm.provision "shell", inline: <<-SHELL
apt-get update apt-get update
apt-get install curl -y apt-get install curl -y
curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io
sh bootstrap-salt.sh -A 192.168.100.120 -U stable 3005 sh bootstrap-salt.sh -A 192.168.100.120 -U stable 3006
cat << EOF > /etc/salt/minion.d/grains.conf cat << EOF > /etc/salt/minion.d/grains.conf
grains: grains:
roles: roles:
@ -90,19 +103,17 @@ EOF
SHELL SHELL
end end
config.vm.define "minion03" do |minion03| config.vm.define "minion03" do |minion03|
minion03.vm.box = "generic/rocky9" minion03.vm.box = "bento/rockylinux-8"
minion03.vm.hostname = "minion03" minion03.vm.hostname = "minion03"
minion03.vm.network "private_network", ip: "192.168.100.123" minion03.vm.network :private_network,
:ip => "192.168.100.123",
:libvirt__dhcp_enabled => false
minion03.vm.provider :libvirt do |libvirt|
libvirt.memory = 1024
end
minion03.vm.provision "shell", inline: <<-SHELL minion03.vm.provision "shell", inline: <<-SHELL
echo -n "> Waiting for network..."
while ! host bootstrap.saltproject.io >/dev/null; do
echo -n "."
sleep 1
done
echo "Proceeding!"
curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io
# workaround for EL > 9 (https://github.com/saltstack/salt-bootstrap/issues/1903) sh bootstrap-salt.sh -A 192.168.100.120 -U stable 3006
sh bootstrap-salt.sh -A 192.168.100.120 -U -P -x python3 onedir 3005
systemctl enable salt-minion systemctl enable salt-minion
cat << EOF > /etc/salt/minion.d/grains.conf cat << EOF > /etc/salt/minion.d/grains.conf
grains: grains:
@ -113,18 +124,17 @@ EOF
SHELL SHELL
end end
config.vm.define "minion04" do |minion04| config.vm.define "minion04" do |minion04|
minion04.vm.box = "generic/centos7" minion04.vm.box = "rockylinux/9"
minion04.vm.hostname = "minion04" minion04.vm.hostname = "minion04"
minion04.vm.network "private_network", ip: "192.168.100.124" minion04.vm.network :private_network,
:ip => "192.168.100.124",
:libvirt__dhcp_enabled => false
minion04.vm.provider :libvirt do |libvirt|
libvirt.memory = 1024
end
minion04.vm.provision "shell", inline: <<-SHELL minion04.vm.provision "shell", inline: <<-SHELL
echo -n "> Waiting for network..."
while ! host bootstrap.saltproject.io >/dev/null; do
echo -n "."
sleep 1
done
echo "Proceeding!"
curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io
sh bootstrap-salt.sh -A 192.168.100.120 -U stable 3005 sh bootstrap-salt.sh -A 192.168.100.120 -U stable 3006
cat << EOF > /etc/salt/minion.d/grains.conf cat << EOF > /etc/salt/minion.d/grains.conf
grains: grains:
roles: roles: