7 $bdb_directory = undef,
8 $bdb_idlcachesize = '',
25 $resource_name = "bob_openldap_server"
27 if($name != "params") {
28 fail("${resource_name}: This function is a singleton. Make sure the resource name is 'params'.")
31 case $operatingsystem {
33 case $operatingsystemrelease {
35 if(!$argsfile) { $_argsfile = "/var/run/openldap/slapd.args" }
36 if(!$bdb_directory) { $_bdb_directory = "/var/lib/ldap" }
37 if(!$conf_path) { $_conf_path = "/etc/openldap/slapd.conf" }
38 if(!$conf_dir) { $_conf_dir = "/etc/openldap/slapd.d" }
39 if(!$package) { $_package = ["openldap-servers"] }
40 if(!$pidfile) { $_pidfile = "/var/run/openldap/slapd.pid" }
41 if(!$service) { $_service = "slapd" }
42 if(!$sysconf_path) { $_sysconf_path = "/etc/sysconfig/ldap" }
48 # Presume the OS did not match and because these args are necessary, just
50 if(!($_argsfile and $_bdb_directory and $_pidfile and $_conf_path and
51 $_package and $_service and $_sysconf_path and $_conf_dir)) {
52 fail("${resource_name}: Unsupported operating system: ${operatingsystem} version ${operatingsystemrelease} and you have not setup the args for: argsfile, bdb_directory, conf_dir, conf_path, package, pidfile, sysconf_path and service.")
55 # Fix paths - add forward slashes at the end of strings without them
56 $_includepath = regsubst($includepath, '([^/])$', '\1/')
57 $_dbconf_path = "${_bdb_directory}/DB_CONFIG"
62 content => template("bob_openldap/slapd.conf"),
63 require => Package[$_package],
67 notify => Service[$_service];
69 content => template("bob_openldap/ldap.sysconf"),
70 require => Package[$_package],
77 before => Service[$_service];
80 notify => Service[$_service];
94 require => [ Package[$_package], File[$_conf_path] ];
100 $network_timeout = '',
104 $tls_cacertdir = undef,
108 $resource_name = "bob_openldap_client"
110 if($name != "params") {
111 fail("${resource_name}: This function is a singleton. Make sure the resource name is 'params'.")
114 case $operatingsystem {
116 case $operatingsystemrelease {
118 if(!$tls_cacertdir) { $_tls_cacertdir = "/etc/openldap/cacerts" }
119 if(!$path) { $_path = "/etc/openldap/ldap.conf" }
125 # Presume the OS did not match and because these args are necessary, just
126 # bail with an error.
127 if(!($_tls_cacertdir and $_path)) {
128 fail("${resource_name}: Unsupported operating system: ${operatingsystem} version ${operatingsystemrelease} and you have not setup the args for: tls_cacertdir, path.")
131 # Fix some vars, ready for templating
134 $_network_timeout = $network_timeout
140 content => template("bob_openldap/ldap.conf")