Add Riak cluster join

This commit is contained in:
David Boucha 2013-07-15 13:04:52 -06:00
parent ac537d9c26
commit 186530652a

View File

@ -33,10 +33,24 @@ def start():
def stop():
'''
Stop riak
Stop Riak
CLI Example::
salt '*' riak.stop
'''
return __salt__['cmd.retcode']('riak stop')
def cluster_join(riak_user=None, riak_host=None):
'''
Join a Riak cluster
CLI Example::
salt '*' riak.cluster_join <user> <host>
'''
if not all((riak_user, riak_host)):
return False
return __salt__['cmd.retcode']('riak-admin cluster join {0}@{1}'.format(riak_user, riak_host))