Skip to content

Instantly share code, notes, and snippets.

@daxroc
Created June 2, 2017 21:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daxroc/9f3b1d6ada4c8af32f268a892b380a51 to your computer and use it in GitHub Desktop.
Save daxroc/9f3b1d6ada4c8af32f268a892b380a51 to your computer and use it in GitHub Desktop.
Example Saltstack client script
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