Merge pull request #24616 from garethgreenaway/2015_5_logging_disabled_states

additional logging in state.py module
This commit is contained in:
Thomas S Hatch 2015-06-12 10:25:39 -06:00
commit f23f99ec35

View File

@ -473,6 +473,7 @@ def highstate(test=None,
salt '*' state.highstate pillar="{foo: 'Foo!', bar: 'Bar!'}"
'''
if _disabled(['highstate']):
log.debug('Salt highstate run is disabled. To re-enable, run state.enable highstate')
ret = {
'name': 'Salt highstate run is disabled. To re-enable, run state.enable highstate',
'result': 'False',
@ -619,6 +620,8 @@ def sls(mods,
disabled = _disabled([mods])
if disabled:
for state in disabled:
log.debug('Salt state {0} run is disabled. To re-enable, run state.enable {0}'.format(state))
__context__['retcode'] = 1
return disabled