Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to display only changes and errors

Tags:

salt-stack

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.

like image 664
Tomáš Fejfar Avatar asked Apr 11 '13 15:04

Tomáš Fejfar


2 Answers

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

like image 151
Michael Krupp Avatar answered Sep 19 '22 15:09

Michael Krupp


We've also added state_output: mixed which will give you the same output as terse, except if there's a failure, in which case it will give you the more verbose output.

like image 38
Colton Myers Avatar answered Sep 21 '22 15:09

Colton Myers