lib/vault/provision/auth/ldap/groups.rb in vault-provision-0.1.2 vs lib/vault/provision/auth/ldap/groups.rb in vault-provision-0.1.4
- old
+ new
@@ -4,13 +4,14 @@
Find.find("#{@instance_dir}/auth/#{auth_point}/groups/").select do |rf|
FileTest.file?(rf) && rf.end_with?('.json')
end
end
+ # Vault supports multiple instances of the 'ldap' backend mounted
+ # concurrently. The map-reducey method repo_files gets the list of
+ # ldap mounts, calls group_files() once for each of the mounts,
+ # then concatenates all those filenames into one big flat array
def repo_files
- #auths = @vault.sys.auths
- #auths.keys.select { |ap| auths[ap].type == 'ldap' }
- # .inject([]) { |acc, elem| acc + group_files(elem) }
@vault.sys.auths.select { |_,v| v.type == 'ldap' }
.keys
.inject([]) { |acc, elem| acc + group_files(elem) }
end