mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-08 02:02:50 +01:00
SO Setup - Fix for CentOS in saltify function
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
# Email: justin@hasecuritysolution.com
|
# Email: justin@hasecuritysolution.com
|
||||||
# Last Update: 12/9/2016
|
# Last Update: 12/9/2016
|
||||||
|
|
||||||
|
|
||||||
filter {
|
filter {
|
||||||
if "bro" in [tags] and "test_data" not in [tags] and "import" not in [tags] {
|
if "bro" in [tags] and "test_data" not in [tags] and "import" not in [tags] {
|
||||||
mutate {
|
mutate {
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
{% set master = salt['grains.get']('master') %}
|
{% set master = salt['grains.get']('master') %}
|
||||||
|
|
||||||
# Trust the CA
|
# Trust the CA
|
||||||
#/usr/local/share/ca-certificates:
|
|
||||||
# file.directory: []
|
|
||||||
|
|
||||||
trusttheca:
|
trusttheca:
|
||||||
x509.pem_managed:
|
x509.pem_managed:
|
||||||
|
|||||||
@@ -392,6 +392,16 @@ saltify() {
|
|||||||
yum clean expire-cache
|
yum clean expire-cache
|
||||||
yum -y install salt-minion yum-utils device-mapper-persistent-data lvm2 openssl
|
yum -y install salt-minion yum-utils device-mapper-persistent-data lvm2 openssl
|
||||||
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
|
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
|
||||||
|
yum -y update
|
||||||
|
|
||||||
|
# Nasty hack but required for now
|
||||||
|
if [ $INSTALLTYPE == 'MASTERONLY' ] || [ $INSTALLTYPE == 'EVALMODE' ]; then
|
||||||
|
yum -y install salt-master python-m2crypto salt-minion
|
||||||
|
else
|
||||||
|
yum -y install salt-minion python-m2m2crypto
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
else
|
else
|
||||||
ADDUSER=useradd
|
ADDUSER=useradd
|
||||||
apt-get -y upgrade
|
apt-get -y upgrade
|
||||||
@@ -417,6 +427,9 @@ saltify() {
|
|||||||
mkdir -p /opt/so/gpg
|
mkdir -p /opt/so/gpg
|
||||||
wget --inet4-only -O /opt/so/gpg/SALTSTACK-GPG-KEY.pub https://repo.saltstack.com/apt/ubuntu/$UVER/amd64/latest/SALTSTACK-GPG-KEY.pub
|
wget --inet4-only -O /opt/so/gpg/SALTSTACK-GPG-KEY.pub https://repo.saltstack.com/apt/ubuntu/$UVER/amd64/latest/SALTSTACK-GPG-KEY.pub
|
||||||
wget --inet4-only -O /opt/so/gpg/docker.pub https://download.docker.com/linux/ubuntu/gpg
|
wget --inet4-only -O /opt/so/gpg/docker.pub https://download.docker.com/linux/ubuntu/gpg
|
||||||
|
# Initialize the new repos
|
||||||
|
apt-get update >>~/sosetup.log 2>&1
|
||||||
|
apt-get -y install salt-minion python-m2crypto >>~/sosetup.log 2>&1
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
@@ -425,13 +438,12 @@ saltify() {
|
|||||||
scp socore@$MSRV:/opt/so/gpg/* $TMP/gpg
|
scp socore@$MSRV:/opt/so/gpg/* $TMP/gpg
|
||||||
apt-key add $TMP/gpg/SALTSTACK-GPG-KEY.pub
|
apt-key add $TMP/gpg/SALTSTACK-GPG-KEY.pub
|
||||||
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
|
||||||
|
# Initialize the new repos
|
||||||
|
apt-get update >>~/sosetup.log 2>&1
|
||||||
|
apt-get -y install salt-minion python-m2crypto >>~/sosetup.log 2>&1
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Initialize the new repos
|
|
||||||
apt-get update >>~/sosetup.log 2>&1
|
|
||||||
apt-get -y install salt-minion python-m2crypto >>~/sosetup.log 2>&1
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user