mirror of
https://github.com/aljazceru/ansible-elasticsearch.git
synced 2025-12-17 17:14:20 +01:00
Initial Shield support + latest gems + single plugin dir + new port/host vars
This commit is contained in:
@@ -19,8 +19,18 @@ def append_to_list(values=[], suffix=''):
|
||||
def array_to_str(values=[],separator=','):
|
||||
return separator.join(values)
|
||||
|
||||
def extract_role_users(users={}):
|
||||
role_users=[]
|
||||
for user,details in users.iteritems():
|
||||
if "roles" in details:
|
||||
for role in details["roles"]:
|
||||
role_users.append(role+":"+user)
|
||||
return role_users
|
||||
|
||||
|
||||
class FilterModule(object):
|
||||
def filters(self):
|
||||
return {'modify_list': modify_list,
|
||||
'append_to_list':append_to_list,
|
||||
'array_to_str':array_to_str}
|
||||
'array_to_str':array_to_str,
|
||||
'extract_role_users':extract_role_users}
|
||||
Reference in New Issue
Block a user