salt: output_loglevel: quiet in cmd.run not working ?

From documentation I think this should work:

output_loglevel Control the loglevel at which the output from the command is logged. Note that the command being run will still be logged (loglevel: DEBUG) regardless, unless quiet is used for this value.

root@saltmaster:~# lsb_release -d
Description:    Debian GNU/Linux 8.2 (jessie)
root@saltmaster:~# salt-call --version
salt-call 2015.8.3 (Beryllium)

state is defined between ELBs as:

throttling-for-ELB-{{ store }}-{{ pool }}-{{ environment }}-{{ aws_region }}:
  cmd.run:
    - name: salt-call test.sleep 2
    - output_loglevel: quiet

and gave still this output:

          ID: throttling-for-ELB-DE-yves-staging-eu-central-1
    Function: cmd.run
        Name: salt-call test.sleep 2
      Result: True
     Comment: Command "salt-call test.sleep 2" run
     Started: 19:20:18.614555
    Duration: 3040.192 ms
     Changes:
              ----------
              pid:
                  5310
              retcode:
                  0
              stderr:
              stdout:
                  local:
                      True

(mmh, and 3 seconds but not 2 ?)

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 17 (4 by maintainers)

Most upvoted comments

This doesn’t work for me either. I think it is a critical bug, because often sensitive information like passwords will be stored in pillars and used in cmd.run states. You don’t want to output those passwords to the screen or to logfiles when the minion runs.

In case someone is interested in a workaround, I am filtering Salt output like this:

salt-call -l info state.highstate |& egrep -v $EXCL_STR Where $EXCL_STR contains all my sensitive data that I never want to see in logs or screen output.

Not ideal by any means, but I wouldn’t be able to even use Salt otherwise.