puppet/ldap/manifests/init.pp

60 lines
1.1 KiB
Puppet

# Install and configure ldap client
#
# === Global variables
#
# $ldap_server:
# Array containing LDAP server URI's.
#
# $ldap_basedn:
# LDAP base DN.
#
class ldap::client {
package { "openldap-client":
name => $operatingsystem ? {
openbsd => "openldap-client",
default => "openldap-clients",
},
ensure => installed,
}
file { "/etc/openldap/ldap.conf":
ensure => present,
content => template("ldap/ldap.conf.erb"),
mode => 0644,
owner => root,
group => $operatingsystem ? {
openbsd => wheel,
default => root,
},
require => Package["openldap-client"],
}
}
# Install python ldap bindings.
#
class ldap::client::python inherits ldap::client {
package { "python-ldap":
name => $operatingsystem ? {
openbsd => "py-ldap",
default => "python-ldap",
},
ensure => installed,
}
}
# Install Ruby ldap bindings.
#
class ldap::client::ruby inherits ldap::client {
package { "ruby-ldap":
ensure => installed,
}
}