def join_cluster(host, user='rabbit', ram_node=None, runas=None):
 cmd = [__context__['rabbitmqctl'], 'join_cluster']
 if ram_node:
  cmd.append('--ram')
 cmd.append('{0}@{1}'.format(user, host))
 if ((runas is None) and (not salt.utils.is_windows())):
  runas = salt.utils.get_user()
 stop_app(runas)
 res = __salt__['cmd.run_all'](cmd, runas=runas, python_shell=False)
 start_app(runas)
 return _format_response(res, 'Join')

def join_cluster ( host , user = 'rabbit' , ram_node = None , runas = None ) : cmd = [ __context__ [ 'rabbitmqctl' ] , 'join_cluster' ] if ram_node : cmd . append ( '--ram' ) cmd . append ( '{0}@{1}' . format ( user , host ) ) if ( ( runas is None ) and ( not salt . utils . is_windows ( ) ) ) : runas = salt . utils . get_user ( ) stop_app ( runas ) res = __salt__ [ 'cmd.run_all' ] ( cmd , runas = runas , python_shell = False ) start_app ( runas ) return _format_response ( res , 'Join' )
join a rabbit cluster cli example: .