Add state_top_saltenv to the config chain

This commit is contained in:
Thomas S Hatch 2015-07-27 10:50:06 -06:00
parent 36a3b674a7
commit 26c858361c
2 changed files with 5 additions and 0 deletions

View file

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

View file

@ -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', []),