mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 01:02:46 +01:00
Do not apply salt state if already applying a state
This commit is contained in:
@@ -211,8 +211,10 @@ function syncElastic() {
|
||||
echo "Database file does not exist yet, skipping users export"
|
||||
fi
|
||||
|
||||
if [[ -z "$SKIP_STATE_APPLY" ]]; then
|
||||
echo "Applying elastic state..."
|
||||
salt-call state.apply elasticsearch queue=True
|
||||
fi
|
||||
}
|
||||
|
||||
function syncAll() {
|
||||
|
||||
@@ -119,6 +119,8 @@ elastic_curl_config_distributed:
|
||||
syncesusers:
|
||||
cmd.run:
|
||||
- name: so-user sync
|
||||
- env:
|
||||
- SKIP_STATE_APPLY: 'true'
|
||||
- creates:
|
||||
- /opt/so/saltstack/local/salt/elasticsearch/files/users
|
||||
- /opt/so/saltstack/local/salt/elasticsearch/files/users_roles
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
so_user_sync:
|
||||
local.cmd.run:
|
||||
- tgt: {{ data['data']['id'] }}
|
||||
- arg:
|
||||
- /usr/sbin/so-user sync
|
||||
Reference in New Issue
Block a user