Puppet Class: openldap::server::slapdconf

Defined in:
manifests/server/slapdconf.pp

Overview

See README.md for details.



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'manifests/server/slapdconf.pp', line 2

class openldap::server::slapdconf {
  include openldap::server

  if $openldap::server::ssl_cert {
    if $openldap::server::ssl_key {
      openldap::server::globalconf { 'TLSCertificate':
        value => {
          'TLSCertificateFile'    => $openldap::server::ssl_cert,
          'TLSCertificateKeyFile' => $openldap::server::ssl_key,
        },
      }
      if $openldap::server::ssl_ca {
        openldap::server::globalconf { 'TLSCACertificateFile':
          value => $openldap::server::ssl_ca,
        }
      }
    } else {
      fail 'You must specify a ssl_key'
    }
  } elsif $openldap::server::ssl_key {
    fail 'You must specify a ssl_cert'
  }

  if $facts['os']['family'] == 'RedHat' {
    openldap::server::database { 'dc=my-domain,dc=com':
      ensure => absent,
    }
  }

  create_resources('openldap::server::database', $openldap::server::databases)
}