aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/openldap/manifests/config.pp2
-rw-r--r--modules/openldap/manifests/init.pp8
-rw-r--r--modules/openldap/manifests/master.pp4
-rw-r--r--modules/openldap/manifests/var.pp7
4 files changed, 16 insertions, 5 deletions
diff --git a/modules/openldap/manifests/config.pp b/modules/openldap/manifests/config.pp
index 6f364ffc..ee8a3187 100644
--- a/modules/openldap/manifests/config.pp
+++ b/modules/openldap/manifests/config.pp
@@ -2,6 +2,6 @@ define openldap::config($content) {
file { $name:
require => Package['openldap-servers'],
content => $content,
- notify => Exec['/etc/init.d/ldap check'],
+ notify => Exec["/etc/init.d/${openldap::var::service} check"],
}
}
diff --git a/modules/openldap/manifests/init.pp b/modules/openldap/manifests/init.pp
index b04379b9..c9d26c89 100644
--- a/modules/openldap/manifests/init.pp
+++ b/modules/openldap/manifests/init.pp
@@ -1,14 +1,16 @@
class openldap {
+ include openldap::var
+
package { 'openldap-servers': }
- service { 'ldap':
+ service { $openldap::var::service:
subscribe => Package['openldap-servers'],
require => Openssl::Self_signed_cert["ldap.${::domain}"],
}
- exec { '/etc/init.d/ldap check':
+ exec { "/etc/init.d/${openldap::var::service} check":
refreshonly => true,
- notify => Service['ldap'],
+ notify => Service[$openldap::var::service],
}
file { '/etc/ssl/openldap/':
diff --git a/modules/openldap/manifests/master.pp b/modules/openldap/manifests/master.pp
index 97c60675..ca1822f9 100644
--- a/modules/openldap/manifests/master.pp
+++ b/modules/openldap/manifests/master.pp
@@ -1,4 +1,6 @@
class openldap::master inherits openldap {
+ include openldap::var
+
Openldap::Config['/etc/openldap/mandriva-dit-access.conf'] {
content => template('openldap/mandriva-dit-access.conf'),
}
@@ -10,7 +12,7 @@ class openldap::master inherits openldap {
group => 'ldap',
owner => 'ldap',
require => Package['openldap-servers'],
- before => Service['ldap'],
+ before => Service[$openldap::var::service],
}
Openldap::Config['/etc/openldap/slapd.conf'] {
diff --git a/modules/openldap/manifests/var.pp b/modules/openldap/manifests/var.pp
new file mode 100644
index 00000000..772ac22b
--- /dev/null
+++ b/modules/openldap/manifests/var.pp
@@ -0,0 +1,7 @@
+class openldap::var {
+ if versioncmp($::lsbdistrelease, '4') < 0 {
+ $service = 'ldap'
+ } else {
+ $service = 'slapd'
+ }
+}