Use the Salt Event System to fire events from the master to the minion and vice-versa.
Fire an event on the local minion event bus. Data must be formed as a dict.
CLI Example:
salt '*' event.fire '{"data":"my event data"}' 'tag'
Fire an event off up to the master server
CLI Example:
salt '*' event.fire_master '{"data":"my event data"}' 'tag'
Send an event to the Salt Master
New in version 2014.7.0.
Parameters: |
|
---|
CLI Example:
salt-call event.send myco/mytag foo=Foo bar=Bar
salt-call event.send 'myco/mytag' '{foo: Foo, bar: Bar}'
A convenient way to allow Jenkins to execute salt-call is via sudo. The following rule in sudoers will allow the jenkins user to run only the following command.
/etc/sudoers (allow preserving the environment):
jenkins ALL=(ALL) NOPASSWD:SETENV: /usr/bin/salt-call event.send*
Call Jenkins via sudo (preserve the environment):
sudo -E salt-call event.send myco/jenkins/build/success with_env=[BUILD_ID, BUILD_URL, GIT_BRANCH, GIT_COMMIT]
Docs for previous releases are available on salt.rtfd.org.
Latest Salt release: 2014.7.2
22.16.52. salt.modules.etcd_mod
Upcoming SaltStack events, webinars and local meet ups and user groups.