Newer
Older
# Basic configuration: /etc/ldap/ldap.conf, /etc/default/slapd, et al.
# Install the OpenLDAP Debian packages.
#
# $distribution: A valid Debian distribution. This can
# be the usual ones, such as "jessie", "stretch", "buster", "sid".
# It can also be one of the stanford special ones, e.g.,
# "stretch-acs-dev", "stretch-acs-prod", etc.
#
# $repository: If the package is found in a non-standard location,
# you can indicate the repository here. Note that the repositories
# - http://debian.stanford.edu/debian-local
# - http://debian.stanford.edu/debian-stanford
# should already be convered and are considerd standard locations.
#
# #########
# Example 1
#
# class {'su_ldap::openldap_install':
# distribution => 'stretch'
# }
#
# This will install the stock OpenLDAP packages from the stretch distribution.
#
#
# #########
# Example 2:
#
# class {'su_ldap::openldap_install':
# distribution => 'stretch-acs-dev'
# }
#
# This will install the OpenLDAP packages from the special stretch-acs-dev
# distribution that resides in the "stanford" repository.
$distribution = undef,
$repository = undef,
# Only need to do something if $distribution is defined.
if ($distribution) {
# If $repository is defined, we need to add a file in
# /etc/apt/sources.list.d.
if ($repository) {
content => template('su_ldap/etc/apt/sources.list.d/ldap.erb')
}
}
# Pin some OpenLDAP packages.
file { '/etc/apt/preferences.d/ldap':
content => template('su_ldap/etc/apt/preferences.d/ldap.erb'),
notify => Exec['ldap aptitude update'];
}
# What about special sasl? LATER.
# Update aptitude.
exec { 'ldap aptitude update':
command => 'aptitude update',
refreshonly => true,
}
}