From d9416f3828124f562c68aab1164ae2f7c7e24a1a Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Mon, 11 Apr 2022 11:04:25 -0400 Subject: [PATCH] Salt local install of Analyst Workstation --- setup/so-functions | 15 +++++++++++++++ setup/so-setup | 14 +++++++++----- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/setup/so-functions b/setup/so-functions index ec1b25a26..2a1ab638b 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -138,6 +138,21 @@ analyze_system() { logCmd "ip a" } +analyst_salt_local() { + + # Install everything using local salt + # Set the repo + securityonion_repo + # Install salt + logCmd "yum -y install salt-minion-3004.1 httpd-tools python3 python36-docker python36-dateutil python36-m2crypto python36-mysql python36-packaging python36-lxml yum-utils device-mapper-persistent-data lvm2 openssl jq" + logCmd "yum -y update --exclude=salt*" + logCmd "systemctl enable salt-minion" + + salt-call state.apply workstation --local --file-root=$temp_install_dir/salt/ -l info + +} + + analyst_workstation_pillar() { local pillar_file=$temp_install_dir/pillar/minions/$MINION_ID.sls diff --git a/setup/so-setup b/setup/so-setup index 26f3aaea7..03a861e44 100755 --- a/setup/so-setup +++ b/setup/so-setup @@ -100,11 +100,15 @@ if [[ $is_analyst ]]; then fi if ! whiptail_analyst_install; then - # Lets make this a standalone - echo "Enabling graphical interface and setting it to load at boot" - systemctl set-default graphical.target - startx - exit 0 + if [[ $is_analyst_iso ]]; then + # Lets make this a standalone + echo "Enabling graphical interface and setting it to load at boot" + systemctl set-default graphical.target + startx + exit 0 + else + analyst_salt_local + fi fi # If you got this far then you want to join the grid