Changeset 664 for trunk/puppet/modules
- Timestamp:
- Apr 30, 2010, 6:25:56 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/puppet/modules/puppet-openldap/manifests/classes/server-slave.pp
r661 r664 6 6 class openldap::server::slave::dev { 7 7 8 # TODO9 # ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/cosine.ldif10 # ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/inetorgperson.ldif11 # ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/rfc2307bis.ldif12 # ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/evolutionperson.ldif13 # ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/mozillaabpersonalpha.ldif14 # ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/consumer-init.ldif15 # ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/consumer-sync.ldif16 17 8 define exec_ldap_files($archivos) { 18 9 exec_ldap_file { $archivos: archivo => $name } … … 20 11 21 12 define exec_ldap_file($archivo) { 13 $test = "/usr/bin/test" 22 14 $ldap_add = "/usr/bin/ldapadd -Y EXTERNAL -H ldapi:/// -f" 15 $slapd_path = "/etc/ldap/slapd.d" 16 $unless = "$test -e $slapd_path/cn=config/cn=schema/cn={*}$name" 17 23 18 file { "${archivo}/$name" : ensure => present } 24 19 exec { "ejecuta$name": 25 20 command => "$ldap_add $archivo/$name", 26 unless => "/usr/bin/test -e /etc/ldap/slapd.d/cn=config/cn=schema/cn={*}$name",21 unless => $unless, 27 22 returns => [0,80], 28 23 } … … 56 51 group => root, 57 52 mode => 750; 58 # before => Exec_ldap_file["/etc/ldap/schema"];59 53 } 60 54 … … 65 59 owner => root, 66 60 group => root; 67 # before => Exec_ldap_files["/etc/ldap"];68 61 "/etc/ldap/consumer-sync.ldif": 69 62 content => template("openldap/consumer-sync.ldif.erb"), … … 71 64 owner => root, 72 65 group => root; 73 # before => Exec_ldap_files["/etc/ldap"];74 66 } 75 67 76 68 exec_ldap_files { "/etc/ldap/schema": 77 archivos => [ "cosine.ldif", "inetorgperson.ldif", "rfc2307bis.ldif", "evolutionperson.ldif", "mozillaabpersonalpha.ldif" ]69 archivos => [ "cosine.ldif", "inetorgperson.ldif", "rfc2307bis.ldif", "evolutionperson.ldif", "mozillaabpersonalpha.ldif" ], 78 70 } 79 71 80 # exec_ldap_files { "/etc/ldap": 81 # archivos => [ "consumer-init.ldif", "consumer-sync.ldif" ] 82 # } 83 72 $test = "/usr/bin/test" 73 $ldap_add = "/usr/bin/ldapadd -Y EXTERNAL -H ldapi:/// -f" 74 $slapd_path = "/etc/ldap/slapd.d" 75 exec { "ejecutaConsumerInit": 76 command => "$ldap_add /etc/ldap/consumer-init.ldif", 77 unless => "$test -e $slapd_path/cn=config/cn=module{0}.ldif", 78 returns => [0,80], 79 } 80 exec { "ejecutaConsumerSync": 81 command => "$ldap_add /etc/ldap/consumer-sync.ldif", 82 unless => "/bin/grep -q 'olcModuleLoad: {1}syncprov' $slapd_path/cn=config/cn=module{0}.ldif", 83 returns => [0,80], 84 } 84 85 85 86 }
Note: See TracChangeset
for help on using the changeset viewer.