ignore changes?

25 views
Skip to first unread message

Guy Matz

unread,
Sep 12, 2018, 5:28:25 PM9/12/18
to salt-...@googlegroups.com
Hi!  How do I tell cmd.run to not register a change, only a fail?

Guy Matz

unread,
Sep 14, 2018, 10:27:45 AM9/14/18
to salt-...@googlegroups.com
Really?  Nothing?

James Booth

unread,
Sep 14, 2018, 2:21:12 PM9/14/18
to salt-...@googlegroups.com
You’ll have to be a little clear in regards to what you want.

Do you want changes to appear as fails?

--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/CABnTgtWi_W0yF9LzCtNaa_yeVrY%2Br6nF7WBDB_zzEDtOGxOmhQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Guy Matz

unread,
Sep 17, 2018, 10:32:15 AM9/17/18
to salt-...@googlegroups.com
Thanks!!  No, I want to run a command as a sort of sanity check on the system, after my tasks have completed . . .  if the command fails, I would like for that to show up, but the command should not register as a change if ti succeeds.

Thank you!

Dafydd Jones (techneg.it)

unread,
Sep 18, 2018, 10:07:27 AM9/18/18
to salt-...@googlegroups.com

Phipps, Thomas

unread,
Sep 18, 2018, 8:39:01 PM9/18/18
to salt-...@googlegroups.com
Sounds like you want something other than a cmd.run

send_error:
  smtp.send_msg:
    - name: It failed
    - subject: States failed
    - unless:
      - 'cmd that if failed you should be warned about'
    

You can also use check_cmd on an earlyer state to have that state show as failed if your command returns false

Guy Matz

unread,
Sep 19, 2018, 10:03:52 AM9/19/18
to salt-...@googlegroups.com
Ah!! Interesting!!  Thanks!!!!

Jay Farschman

unread,
Sep 24, 2018, 9:11:27 AM9/24/18
to Salt-users
Salt conference is happening so people may be a little slow getting back with you.

But I'm not sure what you are asking.  Do you want the cmd.run to only run when it's required to run?  or are you wanting to suppress stdout?  Maybe it's statefulness you want?


CONFIDENTIALITY NOTICE: This email may contain confidential and privileged material for the sole use of the intended recipient(s). Any review, use, distribution or disclosure by others is strictly prohibited.  If you have received this communication in error, please notify the sender immediately by e-mail and delete the message and any file attachments from your computer. Thank you.
Reply all
Reply to author
Forward
0 new messages