create enable_highstate state to reenable highstate following minion restart if it was previously disabled. same with cron

This commit is contained in:
m0duspwnens
2022-01-13 09:39:46 -05:00
parent a28bb23d20
commit 389ff1a46d
3 changed files with 12 additions and 2 deletions

View File

@@ -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 %}

View File

@@ -0,0 +1,7 @@
enable_highstate:
module.run:
- state.enable:
- states:
- highstate
- unless: pgrep soup

View File

@@ -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