camptocamp/puppet-openldap — pull request #39 by ive (2014-11-07 15:45:13+00:00)
Title: Openldap_ssha function added

This PR adds function openldap_ssha - which can be used anytime. The problem with default openldap_password() is - "chicken and egg" - it uses slappasswd utility that comes from slapd package. And because of functions in puppet executing on compile time - this code ''rootpw => openldap_password('mySuperSecretPassword')" will fail with error on pure system:

bug: hiera(): Cannot find datafile /var/lib/hiera/common.yaml, skipping
Debug: importing '/etc/puppet/modules/openldap/manifests/server/config.pp' in environment production
Debug: Automatically imported openldap::server::config from openldap/server/config into production
Debug: importing '/etc/puppet/modules/openldap/manifests/server/service.pp' in environment production
Debug: Automatically imported openldap::server::service from openldap/server/service into production
Debug: importing '/etc/puppet/modules/openldap/manifests/server/slapdconf.pp' in environment production
Debug: Automatically imported openldap::server::slapdconf from openldap/server/slapdconf into production
Debug: importing '/etc/puppet/modules/openldap/manifests/server/database.pp' in environment production
Debug: Automatically imported openldap::server::database from openldap/server/database into production
Debug: Executing 'slappasswd -s password'
Error: Execution of 'slappasswd -s password' returned 1: Error: Could not execute posix command: No such file or directory - slappasswd on node ubuntu.kha.mirantis.net
Error: Execution of 'slappasswd -s password' returned 1: Error: Could not execute posix command: No such file or directory - slappasswd on node ubuntu.kha.mirantis.net