mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Merge pull request #150 from m0duspwnens/master
revert Ubuntu to Salt py2.7
This commit is contained in:
@@ -39,9 +39,9 @@ filebeatpkidir:
|
|||||||
|
|
||||||
# This needs to be owned by root
|
# This needs to be owned by root
|
||||||
filebeatconfsync:
|
filebeatconfsync:
|
||||||
file.recurse:
|
file.managed:
|
||||||
- name: /opt/so/conf/filebeat/etc
|
- name: /opt/so/conf/filebeat/etc/filebeat.yml
|
||||||
- source: salt://filebeat/etc
|
- source: salt://filebeat/etc/filebeat.yml
|
||||||
- user: 0
|
- user: 0
|
||||||
- group: 0
|
- group: 0
|
||||||
- template: jinja
|
- template: jinja
|
||||||
|
|||||||
@@ -525,18 +525,6 @@ install_cleanup() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
install_python3() {
|
|
||||||
|
|
||||||
echo "Installing Python3"
|
|
||||||
|
|
||||||
if [ $OS == 'ubuntu' ]; then
|
|
||||||
apt-get -y install python3-pip python3-dev
|
|
||||||
# elif [ $OS == 'centos' ]; then
|
|
||||||
# yum -y install epel-release python3
|
|
||||||
fi
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
install_prep() {
|
install_prep() {
|
||||||
|
|
||||||
# Create a tmp space that isn't in /tmp
|
# Create a tmp space that isn't in /tmp
|
||||||
@@ -944,6 +932,7 @@ EOF
|
|||||||
fi
|
fi
|
||||||
echo "exclude=salt*" >> /etc/yum.conf
|
echo "exclude=salt*" >> /etc/yum.conf
|
||||||
|
|
||||||
|
# Our OS is not CentOS
|
||||||
else
|
else
|
||||||
ADDUSER=useradd
|
ADDUSER=useradd
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade
|
DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade
|
||||||
@@ -957,13 +946,11 @@ EOF
|
|||||||
# Nasty hack but required for now
|
# Nasty hack but required for now
|
||||||
if [ $INSTALLTYPE == 'MASTERONLY' ] || [ $INSTALLTYPE == 'EVALMODE' ]; then
|
if [ $INSTALLTYPE == 'MASTERONLY' ] || [ $INSTALLTYPE == 'EVALMODE' ]; then
|
||||||
|
|
||||||
#echo "Using pip3 to install python-dateutil for salt"
|
|
||||||
#pip3 install python-dateutil
|
|
||||||
# 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/2019.2/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/py3/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/py3/ubuntu/$UVER/amd64/2019.2 xenial main" > /etc/apt/sources.list.d/saltstack2019.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 -
|
||||||
@@ -983,7 +970,7 @@ EOF
|
|||||||
# Initialize the new repos
|
# Initialize the new repos
|
||||||
apt-get update >> $SETUPLOG 2>&1
|
apt-get update >> $SETUPLOG 2>&1
|
||||||
# Need to add python packages here
|
# Need to add python packages here
|
||||||
apt-get -y install salt-minion=2019.2.2+ds-1 salt-common=2019.2.2+ds-1 python3-dateutil >> $SETUPLOG 2>&1
|
apt-get -y install salt-minion=2019.2.2+ds-1 salt-common=2019.2.2+ds-1 python-dateutil python-m2crypto >> $SETUPLOG 2>&1
|
||||||
apt-mark hold salt-minion salt-common
|
apt-mark hold salt-minion salt-common
|
||||||
|
|
||||||
else
|
else
|
||||||
@@ -995,16 +982,11 @@ EOF
|
|||||||
echo "Using apt-key add to add SALTSTACK-GPG-KEY.pub and GPG-KEY-WAZUH"
|
echo "Using apt-key add to add SALTSTACK-GPG-KEY.pub and GPG-KEY-WAZUH"
|
||||||
apt-key add $TMP/gpg/SALTSTACK-GPG-KEY.pub
|
apt-key add $TMP/gpg/SALTSTACK-GPG-KEY.pub
|
||||||
apt-key add $TMP/gpg/GPG-KEY-WAZUH
|
apt-key add $TMP/gpg/GPG-KEY-WAZUH
|
||||||
echo "deb http://repo.saltstack.com/py3/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 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
|
||||||
echo "Installing libssl-dev for M2Crypto"
|
apt-get -y install salt-minion=2019.2.2+ds-1 salt-common=2019.2.2+ds-1 python-dateutil python-m2crypto >> $SETUPLOG 2>&1
|
||||||
apt-get -y install libssl-dev
|
|
||||||
echo "Using pip3 to install M2Crypto for Salt"
|
|
||||||
pip3 install M2Crypto
|
|
||||||
# Need to add python dateutil here
|
|
||||||
apt-get -y install salt-minion=2019.2.2+ds-1 salt-common=2019.2.2+ds-1 >> $SETUPLOG 2>&1
|
|
||||||
apt-mark hold salt-minion salt-common
|
apt-mark hold salt-minion salt-common
|
||||||
|
|
||||||
fi
|
fi
|
||||||
@@ -1074,9 +1056,7 @@ salt_install_mysql_deps() {
|
|||||||
if [ $OS == 'centos' ]; then
|
if [ $OS == 'centos' ]; then
|
||||||
yum -y install mariadb-devel
|
yum -y install mariadb-devel
|
||||||
elif [ $OS == 'ubuntu' ]; then
|
elif [ $OS == 'ubuntu' ]; then
|
||||||
apt-get -y install libmysqlclient-dev gcc
|
apt-get -y install python-mysqldb
|
||||||
echo "Using pip3 to install mysqlclient for salt"
|
|
||||||
pip3 install mysqlclient
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -166,7 +166,6 @@ if (whiptail_you_sure); then
|
|||||||
# Install salt and dependencies
|
# Install salt and dependencies
|
||||||
{
|
{
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
install_python3 >> $SETUPLOG 2>&1
|
|
||||||
echo -e "XXX\n1\nInstalling and configuring Salt... \nXXX"
|
echo -e "XXX\n1\nInstalling and configuring Salt... \nXXX"
|
||||||
echo " ** Installing Salt and Dependencies **" >> $SETUPLOG
|
echo " ** Installing Salt and Dependencies **" >> $SETUPLOG
|
||||||
saltify >> $SETUPLOG 2>&1
|
saltify >> $SETUPLOG 2>&1
|
||||||
@@ -305,7 +304,6 @@ if (whiptail_you_sure); then
|
|||||||
echo -e "XXX\n0\nSetting Initial Firewall Policy... \nXXX"
|
echo -e "XXX\n0\nSetting Initial Firewall Policy... \nXXX"
|
||||||
set_initial_firewall_policy >> $SETUPLOG 2>&1
|
set_initial_firewall_policy >> $SETUPLOG 2>&1
|
||||||
echo -e "XXX\n1\nInstalling pip3... \nXXX"
|
echo -e "XXX\n1\nInstalling pip3... \nXXX"
|
||||||
install_python3 >> $SETUPLOG 2>&1
|
|
||||||
echo -e "XXX\n3\nCreating Bond Interface... \nXXX"
|
echo -e "XXX\n3\nCreating Bond Interface... \nXXX"
|
||||||
create_sensor_bond >> $SETUPLOG 2>&1
|
create_sensor_bond >> $SETUPLOG 2>&1
|
||||||
echo -e "XXX\n4\nGenerating Sensor Pillar... \nXXX"
|
echo -e "XXX\n4\nGenerating Sensor Pillar... \nXXX"
|
||||||
@@ -410,7 +408,6 @@ if (whiptail_you_sure); then
|
|||||||
echo -e "XXX\n0\nCreating Bond Interface... \nXXX"
|
echo -e "XXX\n0\nCreating Bond Interface... \nXXX"
|
||||||
create_sensor_bond >> $SETUPLOG 2>&1
|
create_sensor_bond >> $SETUPLOG 2>&1
|
||||||
echo -e "XXX\n1\nInstalling Python 3... \nXXX"
|
echo -e "XXX\n1\nInstalling Python 3... \nXXX"
|
||||||
install_python3 >> $SETUPLOG 2>&1
|
|
||||||
echo -e "XXX\n2\nInstalling saltstack... \nXXX"
|
echo -e "XXX\n2\nInstalling saltstack... \nXXX"
|
||||||
saltify >> $SETUPLOG 2>&1
|
saltify >> $SETUPLOG 2>&1
|
||||||
echo -e "XXX\n3\nInstalling docker... \nXXX"
|
echo -e "XXX\n3\nInstalling docker... \nXXX"
|
||||||
@@ -578,7 +575,6 @@ if (whiptail_you_sure); then
|
|||||||
echo -e "XXX\n0\nSetting Initial Firewall Policy... \nXXX"
|
echo -e "XXX\n0\nSetting Initial Firewall Policy... \nXXX"
|
||||||
set_initial_firewall_policy >> $SETUPLOG 2>&1
|
set_initial_firewall_policy >> $SETUPLOG 2>&1
|
||||||
echo -e "XXX\n1\nInstalling pip3... \nXXX"
|
echo -e "XXX\n1\nInstalling pip3... \nXXX"
|
||||||
install_python3 >> $SETUPLOG 2>&1
|
|
||||||
echo -e "XXX\n5\nInstalling Salt Packages... \nXXX"
|
echo -e "XXX\n5\nInstalling Salt Packages... \nXXX"
|
||||||
saltify >> $SETUPLOG 2>&1
|
saltify >> $SETUPLOG 2>&1
|
||||||
echo -e "XXX\n20\nInstalling Docker... \nXXX"
|
echo -e "XXX\n20\nInstalling Docker... \nXXX"
|
||||||
|
|||||||
Reference in New Issue
Block a user