-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
List of states that support check_cmd? #19788
Comments
Ok, I no longer need this as I opened my eyes and realized I could write the cmd.run statement to perform the check itself and set an exit code that would force the state to succeed or fail. But it still would be nice to have the list. I'm also not sure the documentation is correct. I looked again and it references |
From what I understand of the code, check_cmd should be available to any state. If it doesn't work, then what you've encountered might be a bug. |
Ok, let me know if you need more information. Like I said, I moved passed it, but I can try to recreate what I was trying. |
Thanks, @lorengordon. |
@lorengordon, if you have further problems with this, please comment here and I'll reopen the issue. |
Hi @jfindlay, I am seeing a similar issue with the In this Gist, I have a state file, that should fail at every stage, because the I have successfully tested the Cheers, |
Also experiencing this problem with |
Does this work for file.managed? Because if so, then this is working as expected, and the existance of the Only state modules in salt.states.git salt.states.file and salt.states.cmd, which implement calls to their https://github.com/saltstack/salt/blob/2017.7/salt/states/file.py#L2446 Edit: looks like it works correctly for file.managed |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue. |
Is there a list of states that support
check_cmd
? I was attempting to use it withcmd.run
but the option appeared to be ignored. I checked the source for 2014.7 and develop, andcheck_cmd
isn't present. The example in the documentation usesfile.managed
, so I looked at that as well and the check_cmd code was easy enough to spot.The text was updated successfully, but these errors were encountered: