update after installing repos
This commit is contained in:
3
setup.sh
3
setup.sh
@@ -52,6 +52,7 @@ if ! [ -e /usr/bin/salt-call ]; then
|
||||
rpm --import https://repo.saltproject.io/salt/py3/redhat/$OS_VERSION/x86_64/SALT-PROJECT-GPG-PUBKEY-2023.pub
|
||||
[ -f /etc/yum.repos.d/salt.repo ] ||
|
||||
curl -fsSL -o /etc/yum.repos.d/salt.repo https://repo.saltproject.io/salt/py3/redhat/$OS_VERSION/x86_64/minor/$SALT_VERSION.repo
|
||||
yum clean all
|
||||
yum install -y salt-minion
|
||||
elif [[ "$DISTRO" == "ubuntu" ]]; then
|
||||
mkdir /etc/apt/keyrings
|
||||
@@ -59,6 +60,7 @@ if ! [ -e /usr/bin/salt-call ]; then
|
||||
curl -fsSL -o $KEYPATH https://repo.saltproject.io/salt/py3/ubuntu/$OS_VERSION/amd64/SALT-PROJECT-GPG-PUBKEY-2023.gpg
|
||||
[ -f /etc/apt/sources.list.d/salt.list ] ||
|
||||
echo "deb [signed-by=$KEYPATH arch=amd64] https://repo.saltproject.io/salt/py3/ubuntu/$OS_VERSION/amd64/minor/$SALT_VERSION $CODENAME main" > /etc/apt/sources.list.d/salt.list
|
||||
apt-get update
|
||||
apt-get -y install salt-minion
|
||||
elif [[ "$DISTRO" == "debian" ]]; then
|
||||
if [ $OS_VERSION -gt 11 ]; then
|
||||
@@ -71,6 +73,7 @@ if ! [ -e /usr/bin/salt-call ]; then
|
||||
curl -fsSL -o $KEYPATH https://repo.saltproject.io/salt/py3/debian/$OS_VERSION/amd64/SALT-PROJECT-GPG-PUBKEY-2023.gpg
|
||||
[ -f /etc/apt/sources.list.d/salt.list ] ||
|
||||
echo "deb [signed-by=$KEYPATH arch=amd64] https://repo.saltproject.io/salt/py3/debian/10/amd64/minor/$SALT_VERSION $CODENAME main" > /etc/apt/sources.list.d/salt.list
|
||||
apt-get update
|
||||
apt-get -y install salt-minion
|
||||
else
|
||||
echo Unrecognized OS
|
||||
|
||||
Reference in New Issue
Block a user