1 |
class openldap { |
2 |
class base { |
3 |
package { 'openldap-servers': |
4 |
ensure => installed |
5 |
} |
6 |
|
7 |
service { ldap: |
8 |
ensure => running, |
9 |
subscribe => [ Package['openldap-servers']], |
10 |
path => "/etc/init.d/ldap" |
11 |
} |
12 |
} |
13 |
|
14 |
# /etc/ |
15 |
# 11:57:48| blingme> misc: nothing special, just copy slapd.conf, mandriva-dit-access.conf across, slapcat one side, slapadd other side |
16 |
|
17 |
file { '/etc/openldap/slapd.conf': |
18 |
ensure => present, |
19 |
owner => root, |
20 |
group => root, |
21 |
mode => 644, |
22 |
require => Package["openldap-servers"], |
23 |
content => "", |
24 |
notify => [Service['ldap']] |
25 |
} |
26 |
|
27 |
file { '/etc/openldap/mandriva-dit-access.conf': |
28 |
ensure => present, |
29 |
owner => root, |
30 |
group => root, |
31 |
mode => 644, |
32 |
require => Package["openldap-servers"], |
33 |
content => "", |
34 |
notify => [Service['ldap']] |
35 |
} |
36 |
|
37 |
class master inherits base { |
38 |
file { '/etc/openldap/mandriva-dit-access.conf': |
39 |
content => template("openldap/mandriva-dit-access.conf"), |
40 |
} |
41 |
|
42 |
file { '/etc/openldap/slapd.conf': |
43 |
content => template("bind/slapd.conf"), |
44 |
} |
45 |
} |
46 |
} |