SO Setup - Fix for CentOS in saltify function

This commit is contained in:
Mike Reeves
2018-09-10 10:59:43 -04:00
parent 188ce9dd89
commit 9f89826590
3 changed files with 17 additions and 6 deletions

View File

@@ -3,6 +3,7 @@
# Email: justin@hasecuritysolution.com
# Last Update: 12/9/2016
filter {
if "bro" in [tags] and "test_data" not in [tags] and "import" not in [tags] {
mutate {

View File

@@ -1,8 +1,6 @@
{% set master = salt['grains.get']('master') %}
# Trust the CA
#/usr/local/share/ca-certificates:
# file.directory: []
trusttheca:
x509.pem_managed:

View File

@@ -392,6 +392,16 @@ saltify() {
yum clean expire-cache
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 -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
ADDUSER=useradd
apt-get -y upgrade
@@ -417,6 +427,9 @@ saltify() {
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/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
@@ -425,13 +438,12 @@ saltify() {
scp socore@$MSRV:/opt/so/gpg/* $TMP/gpg
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
# Initialize the new repos
apt-get update >>~/sosetup.log 2>&1
apt-get -y install salt-minion python-m2crypto >>~/sosetup.log 2>&1
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
}