mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Add Mock to state.sls
This commit is contained in:
parent
fb0cbd185e
commit
6f757b8c81
1 changed files with 19 additions and 2 deletions
|
@ -484,6 +484,11 @@ def highstate(test=None,
|
|||
"roots" of salt directories (with their own minion config, pillars,
|
||||
file_roots) to run highstate out of.
|
||||
|
||||
mock:
|
||||
The mock option allows for the state run to execute without actually
|
||||
calling any states. This then returns a mocked return which will show
|
||||
the requisite ordering as well as fully validate the state run.
|
||||
|
||||
CLI Example:
|
||||
|
||||
.. code-block:: bash
|
||||
|
@ -624,6 +629,11 @@ def sls(mods,
|
|||
"roots" of salt directories (with their own minion config, pillars,
|
||||
file_roots) to run highstate out of.
|
||||
|
||||
mock:
|
||||
The mock option allows for the state run to execute without actually
|
||||
calling any states. This then returns a mocked return which will show
|
||||
the requisite ordering as well as fully validate the state run.
|
||||
|
||||
CLI Example:
|
||||
|
||||
.. code-block:: bash
|
||||
|
@ -703,9 +713,16 @@ def sls(mods,
|
|||
)
|
||||
|
||||
try:
|
||||
st_ = salt.state.HighState(opts, pillar, kwargs.get('__pub_jid'), proxy=__proxy__)
|
||||
st_ = salt.state.HighState(opts,
|
||||
pillar,
|
||||
kwargs.get('__pub_jid'),
|
||||
proxy=__proxy__,
|
||||
mock=kwargs.get('mock', False))
|
||||
except NameError:
|
||||
st_ = salt.state.HighState(opts, pillar, kwargs.get('__pub_jid'))
|
||||
st_ = salt.state.HighState(opts,
|
||||
pillar,
|
||||
kwargs.get('__pub_jid'),
|
||||
mock=kwargs.get('mock', False))
|
||||
|
||||
umask = os.umask(0o77)
|
||||
if kwargs.get('cache'):
|
||||
|
|
Loading…
Add table
Reference in a new issue