aboutsummaryrefslogtreecommitdiffstats
path: root/modules/openldap/manifests/init.pp
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2012-03-19 14:09:31 +0000
committerMichael Scherer <misc@mageia.org>2012-03-19 14:09:31 +0000
commit78ae7344a797d22336a646824761919c0b1947ba (patch)
tree2208e6a796d5b2ee7d7990f8bc99f7e42d89aa63 /modules/openldap/manifests/init.pp
parent7d9fa450670b083ac96eed85916f76136c044bd4 (diff)
downloadpuppet-78ae7344a797d22336a646824761919c0b1947ba.tar
puppet-78ae7344a797d22336a646824761919c0b1947ba.tar.gz
puppet-78ae7344a797d22336a646824761919c0b1947ba.tar.bz2
puppet-78ae7344a797d22336a646824761919c0b1947ba.tar.xz
puppet-78ae7344a797d22336a646824761919c0b1947ba.zip
split most class and define from main openldap init.pp file
Diffstat (limited to 'modules/openldap/manifests/init.pp')
-rw-r--r--modules/openldap/manifests/init.pp54
1 files changed, 1 insertions, 53 deletions
diff --git a/modules/openldap/manifests/init.pp b/modules/openldap/manifests/init.pp
index 4f2c2d33..23971eb2 100644
--- a/modules/openldap/manifests/init.pp
+++ b/modules/openldap/manifests/init.pp
@@ -1,41 +1,5 @@
class openldap {
- define config($content) {
- file { $name:
- require => Package["openldap-servers"],
- content => $content,
- notify => Exec["/etc/init.d/ldap check"],
- }
- }
-
- class common {
- package { 'openldap-servers': }
-
- service { ldap:
- subscribe => Package['openldap-servers'],
- require => Openssl::Self_signed_cert["ldap.$domain"],
- }
-
- exec { "/etc/init.d/ldap check":
- refreshonly => true,
- notify => Service["ldap"],
- }
-
- file {"/etc/ssl/openldap/":
- ensure => directory,
- }
-
- openssl::self_signed_cert{ "ldap.$domain":
- directory => "/etc/ssl/openldap/"
- }
-
- openldap::config {
- '/etc/openldap/slapd.conf': content => "";
- '/etc/openldap/mandriva-dit-access.conf': content => "";
- '/etc/sysconfig/ldap': content => "";
- }
- }
-
- class master inherits common {
+ class master inherits common {
Openldap::Config['/etc/openldap/mandriva-dit-access.conf'] {
content => template("openldap/mandriva-dit-access.conf"),
}
@@ -76,22 +40,6 @@ class openldap {
}
}
- # this define is here only to be exported by slave
- # and later used by get_ldap_servers
- define exported_slave {
-
- }
-
- # TODO create the user for sync in ldap
- # syntaxic sugar
- define slave_instance($rid) {
- # seems the inheritance do not work as I believe
- include openldap::common
- class { 'openldap::slave':
- rid => $rid,
- }
- }
-
class slave($rid) inherits common {
@@openldap::exported_slave { $rid: }