Created
June 2, 2017 21:46
-
-
Save daxroc/9f3b1d6ada4c8af32f268a892b380a51 to your computer and use it in GitHub Desktop.
Example Saltstack client script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import salt.client | |
import salt.config | |
mopts = salt.config.minion_config(None) | |
mopts['id'] = "test-mirco" | |
mopts['master'] = "testing" | |
caller = salt.client.Caller(mopts=mopts) | |
caller.sminion.functions['event.send']( | |
'mah/important/event', | |
{ | |
'success': True, | |
'message': "It works!", | |
} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment