mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Adding some logging statement to give feedback when states, including highstate, are disabled. Useful when running from scheduler.
This commit is contained in:
parent
e0bb177823
commit
4dbf0ef160
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue