summaryrefslogtreecommitdiff
path: root/manifests/auto_number/search.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/auto_number/search.pp')
-rw-r--r--manifests/auto_number/search.pp32
1 files changed, 32 insertions, 0 deletions
diff --git a/manifests/auto_number/search.pp b/manifests/auto_number/search.pp
new file mode 100644
index 0000000..2bb5ce8
--- /dev/null
+++ b/manifests/auto_number/search.pp
@@ -0,0 +1,32 @@
+# @summary Enable automatic uid and gid numbers by searching.
+#
+# @param search_base
+# ou=People,dc=example,dc=com
+#
+# @param uid
+# Minimum value for user id when searching for next available.
+#
+# @param gid
+# Minimum value for group id when searching for next available.
+#
+# @param dn
+# If you set this, then phpldapadmin will bind to LDAP with this user ID when
+# searching for the uidnumber. The idea is, this user id would have full
+# (readonly) access to uidnumber in your ldap directory (the logged in user
+# may not), so that you can be guaranteed to get a unique uidnumber for your
+# directory.
+# @param pass
+# The password for the dn above.
+class phpldapadmin::auto_number::search (
+ String $search_base,
+ Integer $uid = 10000,
+ Integer $gid = 10000,
+ Optional[String] $dn = undef,
+ Optional[Variant[String, Sensitive[String]]] $pass = undef,
+) {
+ concat::fragment { 'phpLDAPadmin Auto Number':
+ content => epp("${module_name}/auto_number/search.epp"),
+ target => $phpldapadmin::config_file,
+ order => $phpldapadmin::base_config_order + 10,
+ }
+}