salt/doc/ref/states/testing.rst
Erik Johnson 9c63495e04 Formatting fixes
This completes the documentation audit begun in cf365f7, using proper
backticks and :strong: tags to emphasize text, converting groups of
shell commands to bash code-block sections, etc. This also replaces the
use of \* with the easier-to-grok '*', which will hopefully reduce
confusion among new users.
2013-08-11 22:17:47 -05:00

34 lines
1.0 KiB
ReStructuredText

=============
State Testing
=============
Executing a Salt state run can potentially change many aspects of a system and
it may be desirable to first see what a state run is going to change before
applying the run.
Salt has a test interface to report on exactly what will be changed, this
interface can be invoked on any of the major state run functions:
.. code-block:: bash
salt '*' state.highstate test=True
salt '*' state.sls test=True
salt '*' state.single test=True
The test run is mandated by adding the ``test=True`` option to the states. The
return information will show states that will be applied in yellow and the
result is reported as ``None``.
Default Test
============
If the value ``test`` is set to ``True`` in the minion configuration file then
states will default to being executed in test mode. If this value is set then
states can still be run by calling test=False:
.. code-block:: bash
salt '*' state.highstate test=False
salt '*' state.sls test=False
salt '*' state.single test=False