mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Add state_top_saltenv to the config chain
This commit is contained in:
parent
36a3b674a7
commit
26c858361c
2 changed files with 5 additions and 0 deletions
|
@ -89,6 +89,7 @@ VALID_OPTS = {
|
|||
'environment': str,
|
||||
'pillarenv': str,
|
||||
'state_top': str,
|
||||
'state_top_saltenv': str,
|
||||
'startup_states': str,
|
||||
'sls_list': list,
|
||||
'top_file': str,
|
||||
|
@ -325,6 +326,7 @@ DEFAULT_MINION_OPTS = {
|
|||
'pillarenv': None,
|
||||
'extension_modules': '',
|
||||
'state_top': 'top.sls',
|
||||
'state_top_saltenv': None,
|
||||
'startup_states': '',
|
||||
'sls_list': [],
|
||||
'top_file': '',
|
||||
|
@ -542,6 +544,7 @@ DEFAULT_MASTER_OPTS = {
|
|||
'renderer': 'yaml_jinja',
|
||||
'failhard': False,
|
||||
'state_top': 'top.sls',
|
||||
'state_top_saltenv': None,
|
||||
'master_tops': {},
|
||||
'order_masters': False,
|
||||
'job_cache': True,
|
||||
|
|
|
@ -731,6 +731,7 @@ def sls(mods,
|
|||
def top(topfn,
|
||||
test=None,
|
||||
queue=False,
|
||||
saltenv=None,
|
||||
**kwargs):
|
||||
'''
|
||||
Execute a specific top file instead of the default
|
||||
|
@ -767,6 +768,7 @@ def top(topfn,
|
|||
st_ = salt.state.HighState(opts, pillar)
|
||||
st_.push_active()
|
||||
st_.opts['state_top'] = os.path.join('salt://', topfn)
|
||||
st_.opts['state_top_saltenv'] = saltenv
|
||||
try:
|
||||
ret = st_.call_highstate(
|
||||
exclude=kwargs.get('exclude', []),
|
||||
|
|
Loading…
Add table
Reference in a new issue