-
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
script engine #50005
script engine #50005
Conversation
@austinpapp This looks cool! Nicely done. Looks like one of your tests is failing though. |
@garethgreenaway will take a look. thanks. :) |
I have wanted to see this functionality for a while so this is awesome. One thought, though, is that this engine's name really isn't very intuitive. Is |
@cachedout thanks! wrt the naming, yea i thought about that but essentially all engines generate events. seemed redundant to add event to the name. however, im not closely tied to any particular name so if you feel its a better choice, sounds good :) |
What does this PR do?
Creates events based on an arbitrary script's stdout.
The script engine will scrap stdout of the given script and generate an event based on the presence of the 'tag' key and it's value.
If there is a data obj available, that will also be fired along with the tag.
Example:
Given the following json output from a script's stdout:
This will fire the event on the event bus:
Any available serializer to salt can be specified to deserialized stdout such as yaml, json.
What issues does this PR fix or reference?
n/a
Tests written?
Yes
Commits signed with GPG?
No
Please review Salt's Contributing Guide for best practices.
See GitHub's page on GPG signing for more information about signing commits with GPG.