Skip to content
Snippets Groups Projects
config.pp 1.33 KiB
Newer Older
Adam Lewenberg's avatar
Adam Lewenberg committed

# $basedir: where the OpenLDAP databases live. These databases can get quite large, so
#   sometimes set these up as separate disk partitions.
# Default: /var/lib/ldap

class su_ldap::config (
  $hosting_model = undef,
Adam Lewenberg's avatar
Adam Lewenberg committed
  $basedir       = '/var/lib/ldap',
  # Set up some directories including the ones where the databases
  # go.
  file {
    '/etc/keytab':
      ensure => directory,
      mode   => '0755';
Adam Lewenberg's avatar
Adam Lewenberg committed
    $basedir:
      ensure => directory,
      mode   => '0755';
Adam Lewenberg's avatar
Adam Lewenberg committed
    "${basedir}/accesslog":
      ensure => directory,
      mode   => '0755';
    '/var/run/slapd':
      ensure => directory;
  }

  # Make sure the directory that holds the cn=config ldif file exists.
  file { '/etc/ldap/slapd.d':
    ensure  => directory,
    mode    => '0755',
    require => Package['slapd'],
  }

Adam Lewenberg's avatar
Adam Lewenberg committed
  # Install /etc/ldap/ldap.conf.
  file { '/etc/ldap/ldap.conf':
Adam Lewenberg's avatar
Adam Lewenberg committed
    source => 'puppet:///modules/su_ldap/etc/ldap/ldap.conf',
Adam Lewenberg's avatar
Adam Lewenberg committed
    require => Package['slapd'],
  }

Adam Lewenberg's avatar
Adam Lewenberg committed
  # The /etc/default/slapd file specifies keytab locations, ticket caches,
  # startup and library preload options as well as other goodies. The file
Adam Lewenberg's avatar
Adam Lewenberg committed
  # will set the KRB5CCNAME environment variables if the host is a
  # replica.
  file { '/etc/default/slapd':
   source => 'puppet:///modules/su_ldap/etc/default/slapd',
  }

  # Sets up log directory.
  include su_ldap::config::logging