From 222b91dfd1e5451b25d47a80b524fa0900faa9d9 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 31 Jul 2015 16:24:21 +0200 Subject: [PATCH] Puppet: Fix that openldap core schemas are not correctly installed on Red Hat Linux 7 refs #9453 --- .puppet/modules/openldap/manifests/init.pp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.puppet/modules/openldap/manifests/init.pp b/.puppet/modules/openldap/manifests/init.pp index 11cc2b42a..a0480632e 100644 --- a/.puppet/modules/openldap/manifests/init.pp +++ b/.puppet/modules/openldap/manifests/init.pp @@ -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': } } }