Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd.run state - quiet / output_loglevel quiet have no affect #19479

Closed
msheiny opened this issue Jan 7, 2015 · 4 comments
Closed

cmd.run state - quiet / output_loglevel quiet have no affect #19479

msheiny opened this issue Jan 7, 2015 · 4 comments
Assignees
Labels
Bug broken, incorrect, or confusing behavior fixed-pls-verify fix is linked, bug author to confirm fix severity-low 4th level, cosemtic problems, work around exists
Milestone

Comments

@msheiny
Copy link

msheiny commented Jan 7, 2015

I'm running 2014.7.0 on centos 7, under vagrant, without a master (file_client:local). I'm building a formula where I don't want the cmd to be logged but I continue to see this command listed in the output and logs. My snippet looks like this ( i tried both output_loglevel and quiet ) :

Command to Run:
  cmd.run:
    - name: /cmd/to/hide/from/logs -U "{{user}}" -P "{{pass}}"
    - output_loglevel: quiet
    - quiet: True
    - creates: /etc/krb5.keytab

Is this a bug or is there something I'm missing? Thanks!

@rallytime rallytime added Bug broken, incorrect, or confusing behavior severity-low 4th level, cosemtic problems, work around exists labels Jan 8, 2015
@rallytime rallytime added this to the Approved milestone Jan 8, 2015
@rallytime
Copy link
Contributor

Thanks for the report @msheiny. We'll take a look here!

@basepi
Copy link
Contributor

basepi commented Jan 8, 2015

I see the problem(s). I'll get in a fix first thing tomorrow.

@msheiny
Copy link
Author

msheiny commented Jan 9, 2015

Awesome, thanks!

@amoffat
Copy link

amoffat commented Jul 30, 2018

I've had success using cmd.run environment variables. Example:

    cmd.run:
        - name: echo -en "$password\n$password\n" | smbpasswd -s -a backups
        - env:
            - password: {{pillar['samba']['password']}}

output:

          ID: samba
    Function: cmd.run
        Name: echo -en "$password\n$password\n" | smbpasswd -s -a backups
      Result: True
     Comment: Command "echo -en "$password\n$password\n" | smbpasswd -s -a backups" run
     Started: 19:20:11.155744
    Duration: 36.669 ms
     Changes:   
              ----------
              pid:
                  5763
              retcode:
                  0
              stderr:
              stdout:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior fixed-pls-verify fix is linked, bug author to confirm fix severity-low 4th level, cosemtic problems, work around exists
Projects
None yet
Development

No branches or pull requests

4 participants