def join_cluster(host, user='rabbit', ram_node=None, runas=None):
    cmd = ['rabbitmqctl', 'join_cluster']
    if ram_node:
        cmd.append('--ram')
    cmd.append('{0}@{1}'.format(user, host))

    if runas is None:
        runas = salt.utils.get_user()
    stop_app(runas)
    res = __salt__['cmd.run'](cmd, runas=runas, python_shell=False)
    start_app(runas)

    return _format_response(res, 'Join')
Join a rabbit cluster
dataset/ETHPy150Open saltstack/salt/salt/modules/rabbitmq.py/join_cluster