mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-19 07:23:06 +01:00
[fix] Playbook setup bug fixes
* Increase timeout for port check * Exit with non-zero code in user create script if timeout exceeded or error occurs
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
# {%- set admin_pass = salt['pillar.get']('secrets:playbook_admin', None) -%}
|
||||
# {%- set automation_pass = salt['pillar.get']('secrets:playbook_automation', None) %}
|
||||
|
||||
set -e
|
||||
|
||||
local_salt_dir=/opt/so/saltstack/local
|
||||
|
||||
try_count=6
|
||||
@@ -44,7 +46,11 @@ while [[ $try_count -le 6 ]]; do
|
||||
echo " api_key: ${automation_api_key}"
|
||||
} >> $local_salt_dir/pillar/global.sls
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
((try_count++))
|
||||
sleep "${interval}s"
|
||||
done
|
||||
|
||||
# Timeout exceeded, exit with non-zero exit code
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user