Puppet: Fix that openldap core schemas are not correctly installed on Red Hat Linux 7

refs #9453
This commit is contained in:
Eric Lippmann 2015-07-31 16:24:21 +02:00
parent 9379faf9eb
commit 222b91dfd1
1 changed files with 6 additions and 9 deletions

View File

@ -24,14 +24,11 @@ class openldap {
}
if versioncmp($::operatingsystemmajrelease, '7') >= 0 {
['core', 'cosine', 'inetorgperson', 'nis', 'misc', 'openldap'].each |String $schema| {
exec { "slapd-schema-${schema}":
command => "ldapadd -Y EXTERNAL -H ldapi:// -f /etc/openldap/schema/${schema}.ldif",
group => 'root',
require => Package['openldap-servers'],
unless => "test -n \"$(find /etc/openldap/slapd.d/cn=config/cn=schema/ -name cn={*}${schema}.ldif -print -quit)\"",
user => 'root',
}
}
openldap::schema{ 'core': }
-> openldap::schema{ 'cosine': }
-> openldap::schema{ 'inetorgperson': }
-> openldap::schema{ 'nis': }
-> openldap::schema{ 'misc': }
-> openldap::schema{ 'openldap': }
}
}