Adding some logging statement to give feedback when states, including highstate, are disabled. Useful when running from scheduler.

This commit is contained in:
Gareth J. Greenaway 2015-06-11 16:42:03 -07:00
parent e0bb177823
commit 4dbf0ef160

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