Puppet Class: openldap::server::fix_bad_upgrade
- Defined in:
- manifests/server/fix_bad_upgrade.pp
Overview
Class: openldap::server::fix_bad_upgrade
Fix the slapd.d upgrade cycle that we’re not currently ready for.
This pops up in the RPM updates from time to time.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'manifests/server/fix_bad_upgrade.pp', line 8
class openldap::server::fix_bad_upgrade {
assert_private()
# We're not ready for using slapd.d.
# Occasionally, the updated openldap RPM packages come out with an
# automatic upgrade to slapd.d functionality. This works around
# having your system destroyed by that "feature".
exec { 'fix_bad_upgrade':
command => '/bin/rm -rf /etc/openldap/slapd.d && \
if [ -f /etc/openldap/slapd.conf.bak ]; then \
/bin/mv /etc/openldap/slapd.conf.bak /etc/openldap.slapd.conf; \
fi',
require => Package["openldap-servers.${::hardwaremodel}"],
notify => File['/var/lib/ldap/DB_CONFIG'],
onlyif => '/usr/bin/test -d /etc/openldap/slapd.d',
before => [
Exec['bootstrap_ldap'],
File['/etc/openldap/slapd.conf']
]
}
}
|