Created
October 16, 2018 20:59
-
-
Save pcn/be78ab4bdab793bcef147fde385da98b to your computer and use it in GitHub Desktop.
For some reason, this is not sending anything that I can see with
This file contains hidden or 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
# I feel like I should be able to see this with | |
# $ sudo salt-run state.event swi/autoscale/highstate | |
# But I'm not seeing anything. | |
def success_message(minion_name): | |
import salt.client | |
import json | |
__opts__ = salt.config.minion_config('/etc/salt/minion') | |
caller = salt.client.Caller(mopts=__opts__) | |
caller.cmd('event.send', 'swi/autoscale/highstate', json.dumps({"success": minion_name})) | |
caller.cmd('event.send', 'swi/autoscale/highstate', data={"success": minion_name}) | |
caller.cmd('event.send', 'swi/autoscale/highstate', {"success": minion_name}) | |
success_message("test") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment