remove unnecessary sudo

This commit is contained in:
John Bowdre 2023-03-23 18:37:36 -05:00
parent e5622ca798
commit 85c22d940c

29
salt/Vagrantfile vendored
View file

@ -14,8 +14,8 @@ Vagrant.configure("2") do |config|
libvirt.memory = 1024 libvirt.memory = 1024
end end
salt.vm.provision "shell", inline: <<-SHELL salt.vm.provision "shell", inline: <<-SHELL
sudo apt-get update apt-get update
sudo apt-get install curl vim -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 sh bootstrap-salt.sh -M -X
sed -i 's|^#auto_accept:.*$|auto_accept: True|' /etc/salt/master sed -i 's|^#auto_accept:.*$|auto_accept: True|' /etc/salt/master
@ -30,11 +30,11 @@ Vagrant.configure("2") do |config|
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"
minion01.vm.provision "shell", inline: <<-SHELL minion01.vm.provision "shell", inline: <<-SHELL
sudo apt-get update apt-get update
sudo apt-get install curl vim -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
sudo sh bootstrap-salt.sh -A 192.168.100.120 sh bootstrap-salt.sh -A 192.168.100.120
sudo systemctl start salt-minion systemctl start salt-minion
SHELL SHELL
end end
config.vm.define "minion02" do |minion02| config.vm.define "minion02" do |minion02|
@ -42,11 +42,10 @@ Vagrant.configure("2") do |config|
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"
minion02.vm.provision "shell", inline: <<-SHELL minion02.vm.provision "shell", inline: <<-SHELL
sudo apt-get update apt-get update
sudo apt-get install curl vim -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
sudo sh bootstrap-salt.sh -A 192.168.100.120 sh bootstrap-salt.sh -A 192.168.100.120
sudo systemctl start salt-minion
SHELL SHELL
end end
config.vm.define "minion03" do |minion03| config.vm.define "minion03" do |minion03|
@ -54,10 +53,9 @@ Vagrant.configure("2") do |config|
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"
minion03.vm.provision "shell", inline: <<-SHELL minion03.vm.provision "shell", inline: <<-SHELL
sudo yum install vim -y yum install vim -y
curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io
sudo sh bootstrap-salt.sh -A 192.168.100.120 sh bootstrap-salt.sh -A 192.168.100.120 || sh bootstrap-salt.sh -A 192.168.100.120
sudo systemctl start salt-minion
SHELL SHELL
end end
config.vm.define "minion04" do |minion04| config.vm.define "minion04" do |minion04|
@ -65,10 +63,9 @@ Vagrant.configure("2") do |config|
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"
minion04.vm.provision "shell", inline: <<-SHELL minion04.vm.provision "shell", inline: <<-SHELL
sudo yum install vim -y yum install vim -y
curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io
sudo sh bootstrap-salt.sh -A 192.168.100.120 sh bootstrap-salt.sh -A 192.168.100.120
sudo systemctl start salt-minion
SHELL SHELL
end end
end end