ldap: Ugly kludges to get ldap::auth working on Fedora 19.
This commit is contained in:
parent
1fbe904a13
commit
d399d3d05a
1 changed files with 25 additions and 7 deletions
|
@ -95,14 +95,32 @@ class ldap::auth inherits ldap::client {
|
|||
}
|
||||
}
|
||||
Fedora: {
|
||||
package { [ "sssd", "pam_ldap", ]:
|
||||
package { "sssd":
|
||||
ensure => installed,
|
||||
}
|
||||
exec { "authconfig --enableldap --enableldapauth --ldapserver='${ldap_uri}' --ldapbasedn='${ldap_basedn}' --enablesssd --krb5realm='' --update":
|
||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||
unless => 'cat /etc/sysconfig/authconfig | egrep "^USELDAPAUTH=yes$|^USELDAP=yes$" | wc -l | egrep "^2$"',
|
||||
before => Augeas["sssd-conf"],
|
||||
require => Package["authconfig", "sssd", "pam_ldap"],
|
||||
if $::operatingsystemrelease < 19 {
|
||||
package { "pam_ldap":
|
||||
ensure => installed,
|
||||
before => Package["sssd"],
|
||||
}
|
||||
exec { "authconfig --enableldap --enableldapauth --ldapserver='${ldap_uri}' --ldapbasedn='${ldap_basedn}' --enablesssd --krb5realm='' --update":
|
||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||
unless => 'cat /etc/sysconfig/authconfig | egrep "^USELDAPAUTH=yes$|^USELDAP=yes$" | wc -l | egrep "^2$"',
|
||||
before => Augeas["sssd-conf"],
|
||||
require => [ Package["authconfig"], Package["sssd"], ],
|
||||
}
|
||||
} else {
|
||||
exec { "authconfig --enableldap --enableldapauth --ldapserver='${ldap_uri}' --ldapbasedn='${ldap_basedn}' --krb5realm='' --update":
|
||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||
creates => "/etc/sssd/sssd.conf",
|
||||
require => [ Package["authconfig"], Package["sssd"], ],
|
||||
notify => Exec["authconfig --enablesssd --update"],
|
||||
}
|
||||
exec { "authconfig --enablesssd --update":
|
||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||
refreshonly => true,
|
||||
before => Augeas["sssd-conf"],
|
||||
}
|
||||
}
|
||||
augeas { "sssd-conf":
|
||||
changes => [
|
||||
|
@ -113,7 +131,7 @@ class ldap::auth inherits ldap::client {
|
|||
],
|
||||
incl => "/etc/sssd/sssd.conf",
|
||||
lens => "MySQL.lns",
|
||||
before => Service["sssd"],
|
||||
notify => Service["sssd"],
|
||||
}
|
||||
service { "sssd":
|
||||
ensure => running,
|
||||
|
|
Loading…
Add table
Reference in a new issue