mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +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"
|
echo "Database file does not exist yet, skipping users export"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -z "$SKIP_STATE_APPLY" ]]; then
|
||||||
echo "Applying elastic state..."
|
echo "Applying elastic state..."
|
||||||
salt-call state.apply elasticsearch queue=True
|
salt-call state.apply elasticsearch queue=True
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function syncAll() {
|
function syncAll() {
|
||||||
|
|||||||
@@ -119,6 +119,8 @@ elastic_curl_config_distributed:
|
|||||||
syncesusers:
|
syncesusers:
|
||||||
cmd.run:
|
cmd.run:
|
||||||
- name: so-user sync
|
- name: so-user sync
|
||||||
|
- env:
|
||||||
|
- SKIP_STATE_APPLY: 'true'
|
||||||
- creates:
|
- creates:
|
||||||
- /opt/so/saltstack/local/salt/elasticsearch/files/users
|
- /opt/so/saltstack/local/salt/elasticsearch/files/users
|
||||||
- /opt/so/saltstack/local/salt/elasticsearch/files/users_roles
|
- /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