|
4 | 4 | ) { |
5 | 5 | $uris_space = join($uris, ' ') |
6 | 6 | $uris_comma = join($uris, ',') |
| 7 | + |
| 8 | + include "pamldap::config::$operatingsystem" |
| 9 | +} |
| 10 | +class pamldap::config::common { |
7 | 11 | # defaults |
8 | 12 | File { |
9 | 13 | owner => 'root', |
|
40 | 44 | require => Class['pamldap::install'], |
41 | 45 | notify => Class['pamldap::service'], |
42 | 46 | } |
| 47 | + file { '/etc/sssd/sssd.conf': |
| 48 | + ensure => present, |
| 49 | + mode => '0600', |
| 50 | + content => template('pamldap/sssd.conf.erb'), |
| 51 | + require => Class['pamldap::install'], |
| 52 | + notify => Class['pamldap::service'], |
| 53 | + } |
| 54 | +} |
| 55 | + |
| 56 | +class pamldap::config::redhat inherits pamldap::config::common { |
43 | 57 | file { '/etc/ldap.conf': |
44 | 58 | ensure => present, |
45 | 59 | mode => '0444', |
|
53 | 67 | require => File['/etc/ldap.conf'], |
54 | 68 | notify => Class['pamldap::service'], |
55 | 69 | } |
56 | | - file { '/etc/sssd/sssd.conf': |
| 70 | +} |
| 71 | + |
| 72 | +class pamldap::config::centos inherits pamldap::config::redhat { |
| 73 | + # No changes |
| 74 | +} |
| 75 | + |
| 76 | +class pamldap::config::ubuntu inherits pamldap::config::common { |
| 77 | + file { '/etc/ldap/ldap.conf': |
57 | 78 | ensure => present, |
58 | | - mode => '0600', |
59 | | - content => template('pamldap/sssd.conf.erb'), |
| 79 | + mode => '0444', |
| 80 | + content => template('pamldap/ldap.conf.erb'), |
60 | 81 | require => Class['pamldap::install'], |
61 | 82 | notify => Class['pamldap::service'], |
62 | 83 | } |
|
0 commit comments