diff options
author | Michael Scherer <misc@mageia.org> | 2011-05-29 12:09:32 +0000 |
---|---|---|
committer | Michael Scherer <misc@mageia.org> | 2011-05-29 12:09:32 +0000 |
commit | f2fc3f8018963620e3d9772ce5544aace82ecb22 (patch) | |
tree | 741720305704572264060434111520959817172a /modules/openldap/manifests | |
parent | 45f0709f8de1712c236dd20dc7899c59b4fcdb32 (diff) | |
download | puppet-f2fc3f8018963620e3d9772ce5544aace82ecb22.tar puppet-f2fc3f8018963620e3d9772ce5544aace82ecb22.tar.gz puppet-f2fc3f8018963620e3d9772ce5544aace82ecb22.tar.bz2 puppet-f2fc3f8018963620e3d9772ce5544aace82ecb22.tar.xz puppet-f2fc3f8018963620e3d9772ce5544aace82ecb22.zip |
add a slave class to create a 2nd ldap
Diffstat (limited to 'modules/openldap/manifests')
-rw-r--r-- | modules/openldap/manifests/init.pp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/modules/openldap/manifests/init.pp b/modules/openldap/manifests/init.pp index 3d55cb5f..f8acb85f 100644 --- a/modules/openldap/manifests/init.pp +++ b/modules/openldap/manifests/init.pp @@ -77,4 +77,29 @@ class openldap { content => template("openldap/ldap.sysconfig"), } } + + # TODO create the user for sync in ldap + # syntaxic sugar + define slave_instance($rid) { + class { openldap::slave: + rid => $rid, + } + } + + class slave($rid) inherits common { + $sync_password = extlookup("ldap_syncuser-$hostname",'x'); + + # same access rights as master + file { '/etc/openldap/mandriva-dit-access.conf': + content => template("openldap/mandriva-dit-access.conf"), + } + + file { '/etc/openldap/slapd.conf': + content => template("openldap/slapd.conf",'openldap/slapd.syncrepl.conf'), + } + + file { '/etc/sysconfig/ldap': + content => template("openldap/ldap.sysconfig"), + } + } } |