1 |
class pam::base { |
2 |
package { ['pam_ldap','nss_ldap','nscd']: } |
3 |
|
4 |
service { 'nscd': |
5 |
require => Package['nscd'], |
6 |
} |
7 |
|
8 |
file { |
9 |
'/etc/pam.d/system-auth': |
10 |
content => template('pam/system-auth'); |
11 |
'/etc/nsswitch.conf': |
12 |
content => template('pam/nsswitch.conf'); |
13 |
'/etc/ldap.conf': |
14 |
content => template('pam/ldap.conf'); |
15 |
'/etc/openldap/ldap.conf': |
16 |
content => template('pam/openldap.ldap.conf'); |
17 |
} |
18 |
|
19 |
$ldap_password = extlookup("${::fqdn}_ldap_password",'x') |
20 |
file { '/etc/ldap.secret': |
21 |
mode => '0600', |
22 |
content => $ldap_password |
23 |
} |
24 |
} |