Is there a way to display only changes and errors

Tomáš Fejfar picture Tomáš Fejfar · Apr 11, 2013 · Viewed 24k times · Source

I have quite extensive salt config and I want to be able to see what has changed. If I just run salt '*' state.highstate I got the whole list with things that were present and not changed - like 3 to 4 screens of log. But I'd really like to see only things that changed in the last job.

It doesn't have to work for the salt call, it can also employ salt-run jobs.lookup_jid.

Answer

Michael Krupp picture Michael Krupp · Apr 13, 2013

You can set state_verbose: False in /etc/salt/master or /etc/salt/minion. If you want to shorten the output to one line per state, set state_output: terse.

You can also pass these filters on command line:

salt --state-output=terse '*' state.highstate

If you only want to see changes, you can use state-output=changes or state-output=mixed. The latter one will show more information on a failure.

See the following answers fore more detail: basepi, psarossy