#NEWLINE# def cluster_setup( nodes , pcsclustername = 'pcscluster' , extra_args = None ) : #NEWLINE# #INDENT# "\n    Setup pacemaker cluster via pcs command\n\n    nodes\n        a list of nodes which should be set up\n    pcsclustername\n        Name of the Pacemaker cluster (default: pcscluster)\n    extra_args\n        list of extra option for the 'pcs cluster setup' command\n\n    CLI Example:\n\n    .. code-block:: bash\n\n        salt '*' pcs.cluster_setup nodes='[ node1.example.org node2.example.org ]' \\\n                                   pcsclustername='pcscluster'\n    " #NEWLINE# cmd = [ 'pcs' , 'cluster' , 'setup' ] #NEWLINE# cmd += [ '--name' , pcsclustername ] #NEWLINE# cmd += nodes #NEWLINE# if isinstance ( extra_args , ( list , tuple ) ) : #NEWLINE# #INDENT# cmd += extra_args #NEWLINE# #UNINDENT# return __salt__ [ 'cmd.run_all' ] ( pcsclustername , output_loglevel = 'trace' , python_shell = False )