aboutsummaryrefslogtreecommitdiffstats
path: root/modules/openldap/manifests
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2012-03-19 14:09:34 +0000
committerMichael Scherer <misc@mageia.org>2012-03-19 14:09:34 +0000
commitb9f400f50c08d8390794cc1a76fc24ebc7f1f724 (patch)
tree9a725ed976a5dab687f63d2aaedcd1a3d56cef3d /modules/openldap/manifests
parent78ae7344a797d22336a646824761919c0b1947ba (diff)
downloadpuppet-b9f400f50c08d8390794cc1a76fc24ebc7f1f724.tar
puppet-b9f400f50c08d8390794cc1a76fc24ebc7f1f724.tar.gz
puppet-b9f400f50c08d8390794cc1a76fc24ebc7f1f724.tar.bz2
puppet-b9f400f50c08d8390794cc1a76fc24ebc7f1f724.tar.xz
puppet-b9f400f50c08d8390794cc1a76fc24ebc7f1f724.zip
split master of the main file
Diffstat (limited to 'modules/openldap/manifests')
-rw-r--r--modules/openldap/manifests/init.pp43
-rw-r--r--modules/openldap/manifests/master.pp40
2 files changed, 41 insertions, 42 deletions
diff --git a/modules/openldap/manifests/init.pp b/modules/openldap/manifests/init.pp
index 23971eb2..270a6521 100644
--- a/modules/openldap/manifests/init.pp
+++ b/modules/openldap/manifests/init.pp
@@ -1,46 +1,5 @@
class openldap {
- class master inherits common {
- Openldap::Config['/etc/openldap/mandriva-dit-access.conf'] {
- content => template("openldap/mandriva-dit-access.conf"),
- }
-
- $ldap_test_password = extlookup("ldap_test_password",'x')
- $ldap_test_directory = "/var/lib/ldap/test"
- file { "$ldap_test_directory":
- ensure => directory,
- group => ldap,
- owner => ldap,
- require => Package["openldap-servers"],
- before => Service['ldap'],
- }
-
- Openldap::Config['/etc/openldap/slapd.conf'] {
- content => template("openldap/slapd.conf", "openldap/slapd.test.conf"),
- }
-
- Openldap::Config['/etc/sysconfig/ldap'] {
- content => template("openldap/ldap.sysconfig"),
- }
-
- if $environment == "test" {
- # if we ae in a test vm, we need to fill the directory
- # with data
- package { "openldap-clients": }
-
- local_script { "init_ldap.sh":
- content => template('openldap/init_ldap.sh'),
- require => Package["openldap-clients"],
- }
-
- exec { "init_ldap.sh":
- # taken arbitrary among all possible files
- creates => "/var/lib/ldap/objectClass.bdb",
- require => Local_script["init_ldap.sh"],
- }
- }
- }
-
- class slave($rid) inherits common {
+ class slave($rid) inherits common {
@@openldap::exported_slave { $rid: }
diff --git a/modules/openldap/manifests/master.pp b/modules/openldap/manifests/master.pp
new file mode 100644
index 00000000..d57ad029
--- /dev/null
+++ b/modules/openldap/manifests/master.pp
@@ -0,0 +1,40 @@
+class openldap::master inherits openldap::common {
+ Openldap::Config['/etc/openldap/mandriva-dit-access.conf'] {
+ content => template('openldap/mandriva-dit-access.conf'),
+ }
+
+ $ldap_test_password = extlookup('ldap_test_password','x')
+ $ldap_test_directory = '/var/lib/ldap/test'
+ file { $ldap_test_directory:
+ ensure => directory,
+ group => 'ldap',
+ owner => 'ldap',
+ require => Package['openldap-servers'],
+ before => Service['ldap'],
+ }
+
+ Openldap::Config['/etc/openldap/slapd.conf'] {
+ content => template('openldap/slapd.conf', 'openldap/slapd.test.conf'),
+ }
+
+ Openldap::Config['/etc/sysconfig/ldap'] {
+ content => template('openldap/ldap.sysconfig'),
+ }
+
+ if $::environment == 'test' {
+ # if we are in a test vm, we need to fill the directory
+ # with data
+ package { 'openldap-clients': }
+
+ local_script { 'init_ldap.sh':
+ content => template('openldap/init_ldap.sh'),
+ require => Package['openldap-clients'],
+ }
+
+ exec { 'init_ldap.sh':
+ # taken arbitrary among all possible files
+ creates => '/var/lib/ldap/objectClass.bdb',
+ require => Local_script['init_ldap.sh'],
+ }
+ }
+}