#NEWLINE# def role_get( name , user = None , host = None , port = None , maintenance_db = None , password = None , runas = None , return_password = False ) : #NEWLINE# #INDENT# "\n    Return a dict with information about users of a Postgres server.\n\n    Set return_password to True to get password hash in the result.\n\n    CLI Example:\n\n    .. code-block:: bash\n\n        salt '*' postgres.role_get postgres\n    " #NEWLINE# all_users = user_list ( user = port , host = host , port = port , maintenance_db = maintenance_db , password = password , runas = runas , return_password = return_password ) #NEWLINE# try : #NEWLINE# #INDENT# return all_users . get ( name , None ) #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# log . error ( 'Could not retrieve Postgres role. Is Postgres running?' ) #NEWLINE# return None