source: trunk/puppet/modules/puppet-openldap/manifests/classes/server-slave.pp @ 460

Last change on this file since 460 was 449, checked in by sebas, 15 years ago

cambio para que ande la replica

File size: 2.1 KB
Line 
1class openldap::server::slave {
2
3  debug ("configuring openldap::server::slave with dn '$ldap_base'")
4
5  package {"slapd":
6    ensure        => installed,
7    responsefile  => "/var/cache/debconf/slapd.preseed",
8    require       => File["/var/cache/debconf/slapd.preseed"],
9  }
10#  if defined(Package["ldap-utils"]) { } else {
11#    package {"ldap-utils": ensure => present, }
12#  }
13 
14  service {"slapd":
15    ensure  => running,
16    require => Package[slapd],
17  }
18
19#  if ($ldap_ssl_only) {
20#    $line = 'SLAPD_SERVICES="ldaps:///"'
21#  } else {
22    $line = 'SLAPD_SERVICES="ldap:/// ldaps:/// ldapi:///"'
23#  }
24  line {"listen_locally":
25#    line    => 'SLAPD_SERVICES="ldap:/// ldaps:/// ldapi:///"',
26    line    => $line,
27    file    => "/etc/default/slapd",
28    ensure  => present,
29    require => Package[slapd],
30    notify  => Service[slapd],
31  }
32
33  file {
34    "/etc/ldap/slapd.conf":
35      content => template("openldap/slapd.conf_slave.erb"),
36      mode    => 0600,
37      owner   => root,
38      group   => root;
39    "/var/cache/debconf/slapd.preseed":
40      content => template("openldap/slapd.preseed.erb"),
41      mode    => 0600,
42      owner   => root,
43      group   => root;
44   "/usr/local/sbin/ldap-backup.sh":
45      ensure  => present,
46      owner   => root,
47      group   => root,
48      mode    => 755,
49      source  => "puppet:///openldap/usr/local/sbin/ldap-backup.sh";
50    "/var/backups/ldap":
51      ensure  => directory,
52      owner   => root,
53      group   => root,
54      mode    => 750;
55  }
56 
57  file {
58    "/etc/ldap/schema":
59      ensure => directory,
60      mode   => 755,
61      owner  => root,
62      group  => root,
63      require => Package[slapd];
64    "/etc/ldap/schema/authldap.schema":
65      ensure => present,
66      mode   => 644,
67      owner  => root,
68      group  => root,
69      source  => "puppet:///openldap/etc/ldap/schema/authldap.schema",
70      require => File["/etc/ldap/schema"];
71  }
72
73  cron {"ldap-backup":
74    command => "/usr/local/sbin/ldap-backup.sh",
75    user    => "root",
76    hour    => 2,
77    minute  => 0,
78    require => File["/var/backups/ldap"],
79  }
80}
Note: See TracBrowser for help on using the repository browser.