Add watch functions to module state

This commit is contained in:
Thomas S Hatch 2012-06-01 23:18:36 -06:00
parent db9e081cb3
commit 8bfd096629

View file

@ -14,6 +14,22 @@ data with the argument m_name.
import salt.state
def wait(name, **kwargs):
'''
Run a single module function only if the watch statement calls it
name
The module function to execute
**kwargs
Pass any arguments needed to execute the function
'''
return {'name': name,
'changes': {},
'result': True,
'comment': ''}
def run(name, **kwargs):
'''
Run a single module function
@ -102,3 +118,5 @@ def run(name, **kwargs):
ret['result'] = True
ret['changes']['ret'] = mret
return ret
mod_watch = run