mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Add module for executing low, high and templates
This commit is contained in:
parent
d9aaa643fd
commit
6fbc3ee570
33
salt/modules/state.py
Normal file
33
salt/modules/state.py
Normal file
@ -0,0 +1,33 @@
|
||||
'''
|
||||
Control the state system on the minion
|
||||
'''
|
||||
# Import Python modules
|
||||
import os
|
||||
|
||||
# Import salt modules
|
||||
import salt.state
|
||||
|
||||
def low(data):
|
||||
'''
|
||||
Execute a single low data call
|
||||
'''
|
||||
st_ = salt.state.State(__opts__)
|
||||
err = st_.verify_data(data)
|
||||
if err:
|
||||
return err
|
||||
return st_.call(data)
|
||||
|
||||
def high(data):
|
||||
'''
|
||||
Execute the compound calls stored in a single set of high data
|
||||
'''
|
||||
st_ = salt.state.State(__opts__)
|
||||
return st_.call_high(data)
|
||||
|
||||
def template(tem):
|
||||
'''
|
||||
Execute the information stored in a template file on the minion
|
||||
'''
|
||||
st_ = salt.state.State(__opts__)
|
||||
return st_.call_template(tem)
|
||||
|
Loading…
Reference in New Issue
Block a user