#NEWLINE# def event( tagmatch = '*' , count = ( - 1 ) , quiet = False , sock_dir = None , pretty = False , node = 'master' ) : #NEWLINE# #INDENT# "\n    Watch Salt's event bus and block until the given tag is matched\n\n    .. versionadded:: 2014.7.0\n\n    This is useful for utilizing Salt's event bus from shell scripts or for\n    taking simple actions directly from the CLI.\n\n    Enable debug logging to see ignored events.\n\n    :param tagmatch: the event is written to stdout for each tag that matches\n        this pattern; uses the same matching semantics as Salt's Reactor.\n    :param count: this number is decremented for each event that matches the\n        ``tagmatch`` parameter; pass ``-1`` to listen forever.\n    :param quiet: do not print to stdout; just block\n    :param sock_dir: path to the Salt master's event socket file.\n    :param pretty: Output the JSON all on a single line if ``False`` (useful\n        for shell tools); pretty-print the JSON output if ``True``.\n    :param node: Watch the minion-side or master-side event bus.\n        .. versionadded:: 2016.3.0\n\n    CLI Examples:\n\n    .. code-block:: bash\n\n        # Reboot a minion and run highstate when it comes back online\n        salt 'jerry' system.reboot && \\\\\n            salt-run state.event 'salt/minion/jerry/start' count=1 quiet=True && \\\\\n            salt 'jerry' state.highstate\n\n        # Reboot multiple minions and run highstate when all are back online\n        salt -L 'kevin,stewart,dave' system.reboot && \\\\\n            salt-run state.event 'salt/minion/*/start' count=3 quiet=True && \\\\\n            salt -L 'kevin,stewart,dave' state.highstate\n\n        # Watch the event bus forever in a shell while-loop.\n        salt-run state.event | while read -r tag data; do\n            echo $tag\n            echo $data | jq -colour-output .\n        done\n\n    .. seealso::\n\n        See :blob:`tests/eventlisten.sh` for an example of usage within a shell\n        script.\n    " #NEWLINE# statemod = salt . loader . raw_mod ( __opts__ , 'state' , None ) #NEWLINE# return statemod [ 'state.event' ] ( tagmatch = tagmatch , count = count , quiet = quiet , sock_dir = sock_dir , pretty = pretty , node = node )