mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Call mod_init when invoking state.single
This ensures that mod_init is run when state.single is invoked. salt.state.State.call_chunk() is what runs mod_init, but call_chunk() is not invoked by state.single since requisites do not need to be resolved. This commit adds a call to salt.state.State._mod_init() just before salt.state.State.call() is invoked, making sure that the state's mod_init() function is called like it is in state.sls and state.highstate.
This commit is contained in:
parent
1aa991c71f
commit
8f4e3e68b6
@ -719,6 +719,7 @@ def single(fun, name, test=None, queue=False, **kwargs):
|
||||
__context__['retcode'] = 1
|
||||
return err
|
||||
|
||||
st_._mod_init(kwargs)
|
||||
ret = {'{0[state]}_|-{0[__id__]}_|-{0[name]}_|-{0[fun]}'.format(kwargs):
|
||||
st_.call(kwargs)}
|
||||
_set_retcode(ret)
|
||||
|
Loading…
Reference in New Issue
Block a user