Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
$make_home_dir = false,
$filter_users = [ 'root' ],
$filter_groups = [ 'root' ]
) {
) inherits sssd::params {
validate_array($domains)
validate_array($filter_users)
validate_array($filter_groups)
Expand All @@ -55,15 +55,15 @@
create_resources('sssd::domain', $backends)
}

package { 'sssd':
package { $sssd::params::package:
ensure => installed,
}

concat { 'sssd_conf':
path => '/etc/sssd/sssd.conf',
mode => '0600',
# SSSD fails to start if file mode is anything other than 0600
require => Package['sssd'],
require => Package[$sssd::params::package],
}

concat::fragment{ 'sssd_conf_header':
Expand All @@ -77,7 +77,7 @@
}

exec { 'authconfig-sssd':
command => '/usr/sbin/authconfig --enablesssd --enablesssdauth --enablelocauthorize --update',
command => $sssd::params::authconfig_sssd,
refreshonly => true,
subscribe => Concat['sssd_conf'],
}
Expand All @@ -88,7 +88,7 @@
subscribe => Exec['authconfig-sssd'],
}

service { 'crond':
service { $sssd::params::cron_service:
subscribe => Service['sssd'],
}
}
11 changes: 11 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,19 @@
#
class sssd::params {
case $::osfamily {
'Debian': {
$package = [ 'sssd',
'libnss-sss',
'libpam-sss' ]
$dist_uid_min = 1000
$authconfig_sssd = '/bin/true'
$cron_service = 'cron'
}
'RedHat': {
$package = 'sssd'
$dist_uid_min = 1000
$authconfig_sssd = '/usr/sbin/authconfig --enablesssd --enablesssdauth --enablelocauthorize --update'
$cron_service = 'crond'
}
default: {
fail('Unsupported distribution')
Expand Down