SaltStack: Is there a way to only display failed and warnings in output

saltstack

Running state.apply or state.highstate on minions can result in hundreds of lines in output. Sometimes only one minion can be enough.

...
Summary for my_minion
--------------
Succeeded: 112 (changed=78)
Failed:      6
Warnings:    1
--------------
Total states run:     118
Total run time:     4.958 s

Is there a way to show only failed and warnings in the output?

Best Answer

Change the state_output in master's configuration file.

It is also possible to override the state output from the command line, like:

salt '*' state.apply --state-output=mixed

Take a look at the documentation for more information about the state-output.