mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Netowrk Setup - Added salt key acceptance foo
This commit is contained in:
@@ -139,8 +139,14 @@ if (whiptail --title "Security Onion Setup" --yesno "Are you sure you want to in
|
|||||||
# Create bond interface
|
# Create bond interface
|
||||||
if [ $INSTALLTYPE != 'MASTERONLY' ] || [ $INSTALLTYPE != 'BACKENDNODE' ]; then
|
if [ $INSTALLTYPE != 'MASTERONLY' ] || [ $INSTALLTYPE != 'BACKENDNODE' ]; then
|
||||||
echo "Setting up Bond"
|
echo "Setting up Bond"
|
||||||
alias bond0 bonding
|
if [ $OS == 'centos' ]; then
|
||||||
mode=0
|
alias bond0 bonding
|
||||||
|
mode=0
|
||||||
|
# Create Bond files
|
||||||
|
|
||||||
|
else
|
||||||
|
echo bonding >> /etc/modules
|
||||||
|
modprobe bonding
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install Updates and the Salt Package
|
# Install Updates and the Salt Package
|
||||||
@@ -206,7 +212,8 @@ if (whiptail --title "Security Onion Setup" --yesno "Are you sure you want to in
|
|||||||
# Create the grains file for the sensor
|
# Create the grains file for the sensor
|
||||||
touch /etc/salt/grains
|
touch /etc/salt/grains
|
||||||
echo "role: so-sensor" > /etc/salt/grains
|
echo "role: so-sensor" > /etc/salt/grains
|
||||||
|
# Master server
|
||||||
|
echo "master: $MASTER" > /etc/salt/minion
|
||||||
# Start the salt agent
|
# Start the salt agent
|
||||||
service salt-minion start
|
service salt-minion start
|
||||||
|
|
||||||
@@ -223,7 +230,7 @@ if (whiptail --title "Security Onion Setup" --yesno "Are you sure you want to in
|
|||||||
scp /tmp/$HOSTNAME.sls socore@$MASTERSRV:/opt/so/saltstack/pillar/sensors/
|
scp /tmp/$HOSTNAME.sls socore@$MASTERSRV:/opt/so/saltstack/pillar/sensors/
|
||||||
|
|
||||||
# Accept the key on the master
|
# Accept the key on the master
|
||||||
ssh socore@$MASTERSRV 'sudo salt-key -qa $HOSTNAME'
|
ssh socore@$MASTERSRV 'sudo salt-key -ya $HOSTNAME'
|
||||||
# Grab the ssl key for lumberjack from the master
|
# Grab the ssl key for lumberjack from the master
|
||||||
scp socore@$MASTERSRV:/some/path /some/path
|
scp socore@$MASTERSRV:/some/path /some/path
|
||||||
|
|
||||||
@@ -264,6 +271,9 @@ if (whiptail --title "Security Onion Setup" --yesno "Are you sure you want to in
|
|||||||
service salt-master restart
|
service salt-master restart
|
||||||
service salt-minion restart
|
service salt-minion restart
|
||||||
|
|
||||||
|
# Sudoers
|
||||||
|
echo "socore ALL=(ALL) NOPASSWD:/usr/bin/salt-key" | sudo tee -a /etc/sudoers
|
||||||
|
|
||||||
# Create the pillar
|
# Create the pillar
|
||||||
touch /opt/so/saltstack/pillar/masters/$HOSTNAME.sls
|
touch /opt/so/saltstack/pillar/masters/$HOSTNAME.sls
|
||||||
echo "master:" > /opt/so/saltstack/pillar/masters/$HOSTNAME.sls
|
echo "master:" > /opt/so/saltstack/pillar/masters/$HOSTNAME.sls
|
||||||
|
|||||||
Reference in New Issue
Block a user