Skip to content

Commit d2f0311

Browse files
committed
ubuntu uses /etc/ldap/ldap.conf
1 parent ec3c24c commit d2f0311

File tree

1 file changed

+25
-7
lines changed

1 file changed

+25
-7
lines changed

manifests/config.pp

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
) {
55
$uris_space = join($uris, ' ')
66
$uris_comma = join($uris, ',')
7+
8+
include "pamldap::config::$operatingsystem"
9+
}
10+
class pamldap::config::common {
711
# defaults
812
File {
913
owner => 'root',
@@ -28,27 +32,41 @@
2832
require => Class['pamldap::install'],
2933
notify => Class['pamldap::service'],
3034
}
35+
file { '/etc/sssd/sssd.conf':
36+
ensure => present,
37+
mode => '0600',
38+
content => template('pamldap/sssd.conf.erb'),
39+
require => Class['pamldap::install'],
40+
notify => Class['pamldap::service'],
41+
}
42+
}
43+
44+
class pamldap::config::redhat inherits pamldap::config::common {
3145
file { '/etc/ldap.conf':
3246
ensure => present,
3347
mode => '0444',
3448
content => template('pamldap/ldap.conf.erb'),
3549
require => Class['pamldap::install'],
3650
notify => Class['pamldap::service'],
3751
}
38-
file { '/etc/openldap':
39-
ensure => directory,
40-
}
4152
file { [ '/etc/pam_ldap.conf', '/etc/openldap/ldap.conf' ]:
4253
ensure => link,
4354
target => '/etc/ldap.conf',
4455
require => File['/etc/ldap.conf'],
4556
notify => Class['pamldap::service'],
4657
}
47-
file { '/etc/sssd/sssd.conf':
58+
}
59+
60+
class pamldap::config::centos inherits pamldap::config::redhat {
61+
# No changes
62+
}
63+
64+
class pamldap::config::ubuntu inherits pamldap::config::common {
65+
file { '/etc/ldap/ldap.conf':
4866
ensure => present,
49-
mode => '0600',
50-
content => template('pamldap/sssd.conf.erb'),
67+
mode => '0444',
68+
content => template('pamldap/ldap.conf.erb'),
5169
require => Class['pamldap::install'],
5270
notify => Class['pamldap::service'],
5371
}
54-
}
72+
}

0 commit comments

Comments
 (0)