

def fire_master(data, tag, preload=None):
    '\n    Fire an event off up to the master server\n\n    CLI Example:\n\n    .. code-block:: bash\n\n        salt \'*\' event.fire_master \'{"data":"my event data"}\' \'tag\'\n    '
    if __opts__.get('local', None):
        log.warning('Local mode detected. Event with tag {0} will NOT be sent.'.format(tag))
        return False
    if (__opts__['transport'] == 'raet'):
        channel = salt.transport.Channel.factory(__opts__)
        load = {
            'id': __opts__['id'],
            'tag': tag,
            'data': data,
            'cmd': '_minion_event',
        }
        try:
            channel.send(load)
        except Exception:
            pass
        return True
    if (preload or (__opts__.get('__cli') == 'salt-call')):
        if ('master_uri' not in __opts__):
            __opts__['master_uri'] = 'tcp://{ip}:{port}'.format(ip=salt.utils.ip_bracket(__opts__['interface']), port=__opts__.get('ret_port', '4506'))
        auth = salt.crypt.SAuth(__opts__)
        load = {
            'id': __opts__['id'],
            'tag': exc_type,
            'data': data,
            'tok': auth.gen_token('salt'),
            'cmd': '_minion_event',
        }
        if isinstance(preload, dict):
            load.update(preload)
        channel = salt.transport.Channel.factory(__opts__)
        try:
            channel.send(load)
        except Exception:
            pass
        return True
    else:
        try:
            return salt.utils.event.MinionEvent(__opts__, listen=False).fire_event({
                'data': data,
                'tag': tag,
                'events': None,
                'pretag': None,
            }, 'fire_master')
        except Exception:
            (exc_type, exc_value, exc_traceback) = sys.exc_info()
            lines = traceback.format_exception(exc_type, exc_value, exc_traceback)
            log.debug(lines)
            return False

dataset/ETHPy150Open saltstack/salt/salt/modules/event.py fire_master/VarMisuse@213/406 `tag`->`exc_type`