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

View File

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