|
5 | 5 | $uris_space = join($uris, ' ') |
6 | 6 | $uris_comma = join($uris, ',') |
7 | 7 |
|
8 | | - include "pamldap::config::$operatingsystem" |
9 | | -} |
10 | | -class pamldap::config::common { |
11 | 8 | # defaults |
12 | 9 | File { |
13 | 10 | owner => 'root', |
|
51 | 48 | require => Class['pamldap::install'], |
52 | 49 | notify => Class['pamldap::service'], |
53 | 50 | } |
54 | | -} |
55 | 51 |
|
56 | | -class pamldap::config::redhat inherits pamldap::config::common { |
57 | | - file { '/etc/ldap.conf': |
58 | | - ensure => present, |
59 | | - mode => '0444', |
60 | | - content => template('pamldap/ldap.conf.erb'), |
61 | | - require => Class['pamldap::install'], |
62 | | - notify => Class['pamldap::service'], |
63 | | - } |
64 | | - file { [ '/etc/pam_ldap.conf', '/etc/openldap/ldap.conf' ]: |
65 | | - ensure => link, |
66 | | - target => '/etc/ldap.conf', |
67 | | - require => File['/etc/ldap.conf'], |
68 | | - notify => Class['pamldap::service'], |
69 | | - } |
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': |
78 | | - ensure => present, |
79 | | - mode => '0444', |
80 | | - content => template('pamldap/ldap.conf.erb'), |
81 | | - require => Class['pamldap::install'], |
82 | | - notify => Class['pamldap::service'], |
| 52 | + case $::osfamily { |
| 53 | + 'RedHat': { |
| 54 | + file { '/etc/ldap.conf': |
| 55 | + ensure => present, |
| 56 | + mode => '0444', |
| 57 | + content => template('pamldap/ldap.conf.erb'), |
| 58 | + require => Class['pamldap::install'], |
| 59 | + notify => Class['pamldap::service'], |
| 60 | + } |
| 61 | + file { [ '/etc/pam_ldap.conf', '/etc/openldap/ldap.conf' ]: |
| 62 | + ensure => link, |
| 63 | + target => '/etc/ldap.conf', |
| 64 | + require => File['/etc/ldap.conf'], |
| 65 | + notify => Class['pamldap::service'], |
| 66 | + } |
| 67 | + } |
| 68 | + 'Debian': { |
| 69 | + file { '/etc/ldap/ldap.conf': |
| 70 | + ensure => present, |
| 71 | + mode => '0444', |
| 72 | + content => template('pamldap/ldap.conf.erb'), |
| 73 | + require => Class['pamldap::install'], |
| 74 | + notify => Class['pamldap::service'], |
| 75 | + } |
| 76 | + } |
83 | 77 | } |
84 | 78 | } |
0 commit comments