mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-16 05:53:09 +01:00
Avoid running highstate during setup when flipping auth flag
This commit is contained in:
@@ -30,8 +30,10 @@ fi
|
||||
if [[ "$authEnable" == "true" ]]; then
|
||||
if grep -q "enabled: False" "$ES_AUTH_PILLAR"; then
|
||||
sed -i 's/enabled: False/enabled: True/g' "$ES_AUTH_PILLAR"
|
||||
echo "Applying highstate - this may take a few minutes..."
|
||||
salt-call state.highstate queue=True
|
||||
if [[ -z "$ELASTIC_AUTH_SKIP_HIGHSTATE" ]]; then
|
||||
echo "Applying highstate - this may take a few minutes..."
|
||||
salt-call state.highstate queue=True
|
||||
fi
|
||||
echo "Elastic auth is now enabled."
|
||||
if grep -q "argon" "$ES_USERS_FILE"; then
|
||||
echo ""
|
||||
@@ -44,8 +46,10 @@ if [[ "$authEnable" == "true" ]]; then
|
||||
elif [[ "$authEnable" == "false" ]]; then
|
||||
if grep -q "enabled: True" "$ES_AUTH_PILLAR"; then
|
||||
sed -i 's/enabled: True/enabled: False/g' "$ES_AUTH_PILLAR"
|
||||
echo "Applying highstate - this may take a few minutes..."
|
||||
salt-call state.highstate queue=True
|
||||
if [[ -z "$ELASTIC_AUTH_SKIP_HIGHSTATE" ]]; then
|
||||
echo "Applying highstate - this may take a few minutes..."
|
||||
salt-call state.highstate queue=True
|
||||
fi
|
||||
echo "Elastic auth is now disabled."
|
||||
else
|
||||
echo "Auth is already disabled."
|
||||
|
||||
@@ -752,7 +752,7 @@ echo "1" > /root/accept_changes
|
||||
|
||||
set_progress_str 60 "$(print_salt_state_apply 'manager')"
|
||||
salt-call state.apply -l info manager >> $setup_log 2>&1
|
||||
bash /opt/so/saltstack/default/salt/common/tools/sbin/so-elastic-auth
|
||||
ELASTIC_AUTH_SKIP_HIGHSTATE=true bash /opt/so/saltstack/default/salt/common/tools/sbin/so-elastic-auth
|
||||
fi
|
||||
|
||||
set_progress_str 61 "$(print_salt_state_apply 'firewall')"
|
||||
|
||||
Reference in New Issue
Block a user