mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-21 00:13:06 +01:00
upgrade salt to 2019.2.2 - https://github.com/Security-Onion-Solutions/securityonion-saltstack/issues/105
This commit is contained in:
@@ -500,7 +500,7 @@ install_master() {
|
|||||||
wget --inet4-only -O /opt/so/gpg/GPG-KEY-WAZUH https://packages.wazuh.com/key/GPG-KEY-WAZUH
|
wget --inet4-only -O /opt/so/gpg/GPG-KEY-WAZUH https://packages.wazuh.com/key/GPG-KEY-WAZUH
|
||||||
|
|
||||||
else
|
else
|
||||||
apt-get install -y salt-common=2018.3.4+ds-1 salt-master=2018.3.4+ds-1 salt-minion=2018.3.4+ds-1 python-m2crypto
|
apt-get install -y salt-common=2019.2.2+ds-1 salt-master=2019.2.2+ds-1 salt-minion=2019.2.2+ds-1 python-m2crypto
|
||||||
apt-mark hold salt-common salt-master salt-minion
|
apt-mark hold salt-common salt-master salt-minion
|
||||||
apt-get install -y python-m2crypto
|
apt-get install -y python-m2crypto
|
||||||
fi
|
fi
|
||||||
@@ -697,8 +697,8 @@ saltify() {
|
|||||||
|
|
||||||
if [ $INSTALLTYPE == 'MASTERONLY' ] || [ $INSTALLTYPE == 'EVALMODE' ]; then
|
if [ $INSTALLTYPE == 'MASTERONLY' ] || [ $INSTALLTYPE == 'EVALMODE' ]; then
|
||||||
yum -y install https://repo.saltstack.com/yum/redhat/salt-repo-latest-2.el7.noarch.rpm
|
yum -y install https://repo.saltstack.com/yum/redhat/salt-repo-latest-2.el7.noarch.rpm
|
||||||
cp /etc/yum.repos.d/salt-latest.repo /etc/yum.repos.d/salt-2018-3.repo
|
cp /etc/yum.repos.d/salt-latest.repo /etc/yum.repos.d/salt-2019-2.repo
|
||||||
sed -i 's/latest/2018.3/g' /etc/yum.repos.d/salt-2018-3.repo
|
sed -i 's/latest/2019.2/g' /etc/yum.repos.d/salt-2019-2.repo
|
||||||
cat > /etc/yum.repos.d/wazuh.repo <<\EOF
|
cat > /etc/yum.repos.d/wazuh.repo <<\EOF
|
||||||
[wazuh_repo]
|
[wazuh_repo]
|
||||||
gpgcheck=1
|
gpgcheck=1
|
||||||
@@ -812,13 +812,13 @@ EOF
|
|||||||
echo "gpgkey=file:///etc/pki/rpm-gpg/saltstack-signing-key" >> /etc/yum.repos.d/salt-latest.repo
|
echo "gpgkey=file:///etc/pki/rpm-gpg/saltstack-signing-key" >> /etc/yum.repos.d/salt-latest.repo
|
||||||
|
|
||||||
# Proxy is hating on me.. Lets just set it manually
|
# Proxy is hating on me.. Lets just set it manually
|
||||||
echo "[salt-2018.3]" > /etc/yum.repos.d/salt-2018-3.repo
|
echo "[salt-2019.2]" > /etc/yum.repos.d/salt-2019-2.repo
|
||||||
echo "name=SaltStack Latest Release Channel for RHEL/Centos \$releasever" >> /etc/yum.repos.d/salt-2018-3.repo
|
echo "name=SaltStack Latest Release Channel for RHEL/Centos \$releasever" >> /etc/yum.repos.d/salt-2019-2.repo
|
||||||
echo "baseurl=https://repo.saltstack.com/yum/redhat/7/\$basearch/2018.3" >> /etc/yum.repos.d/salt-2018-3.repo
|
echo "baseurl=https://repo.saltstack.com/yum/redhat/7/\$basearch/2019.2" >> /etc/yum.repos.d/salt-2019-2.repo
|
||||||
echo "failovermethod=priority" >> /etc/yum.repos.d/salt-2018-3.repo
|
echo "failovermethod=priority" >> /etc/yum.repos.d/salt-2019-2.repo
|
||||||
echo "enabled=1" >> /etc/yum.repos.d/salt-2018-3.repo
|
echo "enabled=1" >> /etc/yum.repos.d/salt-2019-2.repo
|
||||||
echo "gpgcheck=1" >> /etc/yum.repos.d/salt-2018-3.repo
|
echo "gpgcheck=1" >> /etc/yum.repos.d/salt-2019-2.repo
|
||||||
echo "gpgkey=file:///etc/pki/rpm-gpg/saltstack-signing-key" >> /etc/yum.repos.d/salt-2018-3.repo
|
echo "gpgkey=file:///etc/pki/rpm-gpg/saltstack-signing-key" >> /etc/yum.repos.d/salt-2019-2.repo
|
||||||
|
|
||||||
cat > /etc/yum.repos.d/wazuh.repo <<\EOF
|
cat > /etc/yum.repos.d/wazuh.repo <<\EOF
|
||||||
[wazuh_repo]
|
[wazuh_repo]
|
||||||
@@ -831,8 +831,8 @@ protect=1
|
|||||||
EOF
|
EOF
|
||||||
else
|
else
|
||||||
yum -y install https://repo.saltstack.com/yum/redhat/salt-repo-latest-2.el7.noarch.rpm
|
yum -y install https://repo.saltstack.com/yum/redhat/salt-repo-latest-2.el7.noarch.rpm
|
||||||
cp /etc/yum.repos.d/salt-latest.repo /etc/yum.repos.d/salt-2018-3.repo
|
cp /etc/yum.repos.d/salt-latest.repo /etc/yum.repos.d/salt-2019-2.repo
|
||||||
sed -i 's/latest/2018.3/g' /etc/yum.repos.d/salt-2018-3.repo
|
sed -i 's/latest/2019.2/g' /etc/yum.repos.d/salt-2019-2.repo
|
||||||
cat > /etc/yum.repos.d/wazuh.repo <<\EOF
|
cat > /etc/yum.repos.d/wazuh.repo <<\EOF
|
||||||
[wazuh_repo]
|
[wazuh_repo]
|
||||||
gpgcheck=1
|
gpgcheck=1
|
||||||
@@ -846,16 +846,16 @@ EOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
yum clean expire-cache
|
yum clean expire-cache
|
||||||
yum -y install salt-minion-2018.3.4 yum-utils device-mapper-persistent-data lvm2 openssl python-dateutil
|
yum -y install salt-minion-2019.2.2 yum-utils device-mapper-persistent-data lvm2 openssl python-dateutil
|
||||||
yum -y update exclude=salt*
|
yum -y update exclude=salt*
|
||||||
systemctl enable salt-minion
|
systemctl enable salt-minion
|
||||||
|
|
||||||
# Nasty hack but required for now
|
# Nasty hack but required for now
|
||||||
if [ $INSTALLTYPE == 'MASTERONLY' ] || [ $INSTALLTYPE == 'EVALMODE' ]; then
|
if [ $INSTALLTYPE == 'MASTERONLY' ] || [ $INSTALLTYPE == 'EVALMODE' ]; then
|
||||||
yum -y install salt-master-2018.3.4 python-m2crypto salt-minion-2018.3.4 m2crypto
|
yum -y install salt-master-2019.2.2 python-m2crypto salt-minion-2019.2.2 m2crypto
|
||||||
systemctl enable salt-master
|
systemctl enable salt-master
|
||||||
else
|
else
|
||||||
yum -y install salt-minion-2018.3.4 python-m2m2crypto m2crypto
|
yum -y install salt-minion-2019.2.2 python-m2m2crypto m2crypto
|
||||||
fi
|
fi
|
||||||
echo "exclude=salt*" >> /etc/yum.conf
|
echo "exclude=salt*" >> /etc/yum.conf
|
||||||
|
|
||||||
@@ -874,9 +874,9 @@ EOF
|
|||||||
|
|
||||||
# Install the repo for salt
|
# Install the repo for salt
|
||||||
wget --inet4-only -O - https://repo.saltstack.com/apt/ubuntu/$UVER/amd64/latest/SALTSTACK-GPG-KEY.pub | apt-key add -
|
wget --inet4-only -O - https://repo.saltstack.com/apt/ubuntu/$UVER/amd64/latest/SALTSTACK-GPG-KEY.pub | apt-key add -
|
||||||
wget --inet4-only -O - https://repo.saltstack.com/apt/ubuntu/$UVER/amd64/2018.3/SALTSTACK-GPG-KEY.pub | apt-key add -
|
wget --inet4-only -O - https://repo.saltstack.com/apt/ubuntu/$UVER/amd64/2019.2/SALTSTACK-GPG-KEY.pub | apt-key add -
|
||||||
echo "deb http://repo.saltstack.com/apt/ubuntu/$UVER/amd64/latest xenial main" > /etc/apt/sources.list.d/saltstack.list
|
echo "deb http://repo.saltstack.com/apt/ubuntu/$UVER/amd64/latest xenial main" > /etc/apt/sources.list.d/saltstack.list
|
||||||
echo "deb http://repo.saltstack.com/apt/ubuntu/$UVER/amd64/2018.3 xenial main" > /etc/apt/sources.list.d/saltstack2018.list
|
echo "deb http://repo.saltstack.com/apt/ubuntu/$UVER/amd64/2019.2 xenial main" > /etc/apt/sources.list.d/saltstack2019.list
|
||||||
|
|
||||||
# Lets get the docker repo added
|
# Lets get the docker repo added
|
||||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
|
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
|
||||||
@@ -895,7 +895,7 @@ EOF
|
|||||||
|
|
||||||
# Initialize the new repos
|
# Initialize the new repos
|
||||||
apt-get update >> $SETUPLOG 2>&1
|
apt-get update >> $SETUPLOG 2>&1
|
||||||
apt-get -y install salt-minion=2018.3.4+ds-1 salt-common=2018.3.4+ds-1 python-m2cryptoi python-dateutil >> $SETUPLOG 2>&1
|
apt-get -y install salt-minion=2019.2.2+ds-1 salt-common=2019.2.2+ds-1 python-m2cryptoi python-dateutil >> $SETUPLOG 2>&1
|
||||||
apt-mark hold salt-minion salt-common
|
apt-mark hold salt-minion salt-common
|
||||||
|
|
||||||
else
|
else
|
||||||
@@ -909,7 +909,7 @@ EOF
|
|||||||
echo "deb https://packages.wazuh.com/3.x/apt/ stable main" | tee /etc/apt/sources.list.d/wazuh.list
|
echo "deb https://packages.wazuh.com/3.x/apt/ stable main" | tee /etc/apt/sources.list.d/wazuh.list
|
||||||
# Initialize the new repos
|
# Initialize the new repos
|
||||||
apt-get update >> $SETUPLOG 2>&1
|
apt-get update >> $SETUPLOG 2>&1
|
||||||
apt-get -y install salt-minion=2018.3.4+ds-1 salt-common=2018.3.4+ds-1 python-m2crypto python-dateutil >> $SETUPLOG 2>&1
|
apt-get -y install salt-minion=2019.2.2+ds-1 salt-common=2019.2.2+ds-1 python-m2crypto python-dateutil >> $SETUPLOG 2>&1
|
||||||
apt-mark hold salt-minion salt-common
|
apt-mark hold salt-minion salt-common
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user