functions and paramaters
This commit is contained in:
parent
e2b3c129a2
commit
fdc390d060
@ -1,20 +1,34 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
## Config de Grub
|
## Config de Grub
|
||||||
# Save old grub
|
# Save old grub
|
||||||
|
conf_grub (){
|
||||||
|
GRUB_DEFAULT=1
|
||||||
|
echo "----------- Move and config Grub ----"
|
||||||
cp /etc/default/grub /etc/default/grub.back
|
cp /etc/default/grub /etc/default/grub.back
|
||||||
sed 's/GRUB_DEFAULT=0/GRUB_DEFAULT=4/g' /etc/default/grub > grub.n
|
sed 's/GRUB_DEFAULT=0/GRUB_DEFAULT=$GRUB_DEFAULT/g' /etc/default/grub > grub.n
|
||||||
mv grub.n /etc/default/grub
|
mv grub.n /etc/default/grub
|
||||||
|
echo "----------- Move and config Grub: DONE ----"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
## Install Salt
|
## Install Salt
|
||||||
|
conf_salt (){
|
||||||
|
SALT_MASTER="192.168.1.22"
|
||||||
# Install
|
# Install
|
||||||
|
echo "----------- Add repos for salt -------"
|
||||||
add-apt-repository ppa:saltstack/salt
|
add-apt-repository ppa:saltstack/salt
|
||||||
apt-get update
|
apt-get update
|
||||||
|
echo "----------- Install Salt -------------"
|
||||||
apt-get install salt-minion
|
apt-get install salt-minion
|
||||||
# Config Salt
|
# Config Salt
|
||||||
|
echo "---------- Config Salt ---------------"
|
||||||
cp /etc/salt/minion /etc/salt/minion.back
|
cp /etc/salt/minion /etc/salt/minion.back
|
||||||
echo "master = 192.168.1.22" >> /etc/salt/minion
|
echo "master: $SALT_MASTER" >> /etc/salt/minion
|
||||||
# Wait for the answer of the master
|
# Wait for the answer of the master
|
||||||
salt-minion -l debug
|
salt-minion -l debug
|
||||||
|
}
|
||||||
|
|
||||||
|
conf_grub
|
||||||
|
conf_salt
|
||||||
|
Loading…
Reference in New Issue
Block a user