Puppet: Add openldap::schema for installing a schema

refs #9453
This commit is contained in:
Eric Lippmann 2015-07-31 16:23:51 +02:00
parent df38e127e1
commit 9379faf9eb
1 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,24 @@
# define: openldap::schema
#
# Install a schema.
#
# Parameters:
#
# Actions:
#
# Requires:
#
# Sample Usage:
#
define openldap::schema {
include openldap
exec { "openldap-schema-${name}":
command => "ldapadd -Y EXTERNAL -H ldapi:// -f /etc/openldap/schema/${name}.ldif",
group => 'root',
require => Service['slapd'],
unless => "test -n \"$(find /etc/openldap/slapd.d/cn=config/cn=schema/ -name cn={*}${name}.ldif -print -quit)\"",
user => 'root',
}
}