mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-09 18:52:52 +01:00
ubuntu changes
This commit is contained in:
@@ -200,13 +200,6 @@ sostatus_log:
|
||||
- name: /opt/so/log/sostatus/status.log
|
||||
- mode: 644
|
||||
|
||||
common_pip_dependencies:
|
||||
pip.installed:
|
||||
- user: root
|
||||
- pkgs:
|
||||
- rich
|
||||
- target: /usr/lib64/python3.6/site-packages
|
||||
|
||||
# Install sostatus check cron
|
||||
sostatus_check_cron:
|
||||
cron.present:
|
||||
|
||||
@@ -10,23 +10,31 @@ commonpkgs:
|
||||
- wget
|
||||
- ntpdate
|
||||
- jq
|
||||
- python3-docker
|
||||
- curl
|
||||
- ca-certificates
|
||||
- software-properties-common
|
||||
- apt-transport-https
|
||||
- openssl
|
||||
- netcat
|
||||
- python3-mysqldb
|
||||
- sqlite3
|
||||
- libssl-dev
|
||||
- python3-dateutil
|
||||
- python3-m2crypto
|
||||
- python3-mysqldb
|
||||
- python3-packaging
|
||||
- python3-lxml
|
||||
- git
|
||||
- vim
|
||||
|
||||
# since Ubuntu requires and internet connection we can use pip to install modules
|
||||
python3-pip:
|
||||
pkg.installed
|
||||
|
||||
python-rich:
|
||||
pip.installed:
|
||||
- name: rich
|
||||
- require:
|
||||
- pkg: python3-pip
|
||||
|
||||
|
||||
{% elif GLOBALS.os == 'Rocky' %}
|
||||
commonpkgs:
|
||||
pkg.installed:
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
|
||||
# https://securityonion.net/license; you may not use this file except in compliance with the
|
||||
# Elastic License 2.0.
|
||||
{% from 'vars/globals.map.jinja' import GLOBALS %}
|
||||
{% from 'ntp/config.map.jinja' import NTPCONFIG %}
|
||||
|
||||
chronyconf:
|
||||
@@ -12,8 +13,12 @@ chronyconf:
|
||||
- defaults:
|
||||
NTPCONFIG: {{ NTPCONFIG }}
|
||||
|
||||
{% if GLOBALS.os == 'Rocky' %}
|
||||
chronyd:
|
||||
{% else %}
|
||||
chrony:
|
||||
{% endif %}
|
||||
service.running:
|
||||
- enable: True
|
||||
- watch:
|
||||
- file: chronyconf
|
||||
- file: chronyconf
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
# this removes the repo file left by bootstrap-salt.sh without -r
|
||||
remove_salt.list:
|
||||
file.absent:
|
||||
- name: /etc/apt/sources.list.d/salt.list
|
||||
|
||||
saltstack.list:
|
||||
file.managed:
|
||||
- name: /etc/apt/sources.list.d/saltstack.list
|
||||
- contents:
|
||||
- deb https://repo.securityonion.net/file/securityonion-repo/ubuntu/{{grains.osrelease}}/amd64/salt3004.2/ {{grains.oscodename}} main
|
||||
|
||||
apt_update:
|
||||
cmd.run:
|
||||
- name: apt-get update
|
||||
- onchanges:
|
||||
- file: saltstack.list
|
||||
- timeout: 30
|
||||
- retry:
|
||||
attempts: 5
|
||||
interval: 30
|
||||
@@ -1,16 +1,8 @@
|
||||
{% from 'vars/globals.map.jinja' import GLOBALS %}
|
||||
|
||||
{% if GLOBALS.os != 'Rocky' %}
|
||||
{% if grains.oscodename == 'focal' %}
|
||||
saltpymodules:
|
||||
pkg.installed:
|
||||
- pkgs:
|
||||
{% if grains['oscodename'] == 'bionic' %}
|
||||
- python-m2crypto
|
||||
- python-docker
|
||||
{% elif grains['oscodename'] == 'focal' %}
|
||||
- python3-m2crypto
|
||||
- python3-docker
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
salt_bootstrap:
|
||||
|
||||
@@ -674,8 +674,13 @@ configure_ntp() {
|
||||
'rtcsync' \
|
||||
'logdir /var/log/chrony' >> $chrony_conf
|
||||
|
||||
systemctl enable chronyd
|
||||
systemctl restart chronyd
|
||||
if [ "$OS" == 'rocky' ]; then
|
||||
systemctl enable chronyd
|
||||
systemctl restart chronyd
|
||||
elif [ "$OS" == 'ubuntu' ]; then
|
||||
systemctl enable chrony
|
||||
systemctl restart chrony
|
||||
fi
|
||||
|
||||
# Tell the chrony daemon to sync time & update the system time
|
||||
# Since these commands only make a call to chronyd, wait after each command to make sure the changes are made
|
||||
@@ -959,15 +964,17 @@ installer_progress_loop() {
|
||||
}
|
||||
|
||||
installer_prereq_packages() {
|
||||
if [ "$OS" == rocky ]; then
|
||||
if [[ ! $is_iso ]]; then
|
||||
if ! command -v nmcli > /dev/null 2>&1; then
|
||||
logCmd "dnf -y install NetworkManager"
|
||||
fi
|
||||
fi
|
||||
logCmd "systemctl enable NetworkManager"
|
||||
logCmd "systemctl start NetworkManager"
|
||||
elif [ "$OS" == ubuntu ]; then
|
||||
# if [ "$OS" == rocky ]; then
|
||||
# if [[ ! $is_iso ]]; then
|
||||
# if ! command -v nmcli > /dev/null 2>&1; then
|
||||
# logCmd "dnf -y install NetworkManager"
|
||||
# fi
|
||||
# fi
|
||||
# logCmd "systemctl enable NetworkManager"
|
||||
# logCmd "systemctl start NetworkManager"
|
||||
# el
|
||||
|
||||
if [ "$OS" == ubuntu ]; then
|
||||
# Print message to stdout so the user knows setup is doing something
|
||||
retry 150 10 "apt-get update" "" "Err:" >> "$setup_log" 2>&1 || exit 1
|
||||
# Install network manager so we can do interface stuff
|
||||
|
||||
@@ -641,6 +641,7 @@ if ! [[ -f $install_opt_file ]]; then
|
||||
mkdir -p /opt/so
|
||||
es_heapsize
|
||||
ls_heapsize
|
||||
installer_prereq_packages
|
||||
generate_interface_vars
|
||||
if [[ $monints ]]; then
|
||||
configure_network_sensor
|
||||
|
||||
Reference in New Issue
Block a user