mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
create enable_highstate state to reenable highstate following minion restart if it was previously disabled. same with cron
This commit is contained in:
@@ -4,9 +4,8 @@
|
|||||||
{% set role = grains.id.split('_') | last %}
|
{% set role = grains.id.split('_') | last %}
|
||||||
{% from 'elasticsearch/auth.map.jinja' import ELASTICAUTH with context %}
|
{% from 'elasticsearch/auth.map.jinja' import ELASTICAUTH with context %}
|
||||||
|
|
||||||
include:
|
|
||||||
- cron.running
|
|
||||||
{% if grains.role in ['so-eval', 'so-manager', 'so-standalone', 'so-managersearch', 'so-import'] %}
|
{% if grains.role in ['so-eval', 'so-manager', 'so-standalone', 'so-managersearch', 'so-import'] %}
|
||||||
|
include:
|
||||||
- manager.elasticsearch # needed for elastic_curl_config state
|
- manager.elasticsearch # needed for elastic_curl_config state
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|||||||
7
salt/salt/enable_highstate.sls
Normal file
7
salt/salt/enable_highstate.sls
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
enable_highstate:
|
||||||
|
module.run:
|
||||||
|
- state.enable:
|
||||||
|
- states:
|
||||||
|
- highstate
|
||||||
|
- unless: pgrep soup
|
||||||
|
|
||||||
@@ -19,6 +19,10 @@
|
|||||||
|
|
||||||
base:
|
base:
|
||||||
|
|
||||||
|
'*':
|
||||||
|
- salt.enable_highstate
|
||||||
|
- cron.running
|
||||||
|
|
||||||
'not G@saltversion:{{saltversion}}':
|
'not G@saltversion:{{saltversion}}':
|
||||||
- match: compound
|
- match: compound
|
||||||
- salt.minion-state-apply-test
|
- salt.minion-state-apply-test
|
||||||
|
|||||||
Reference in New Issue
Block a user