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: {
|
Fedora: {
|
||||||
package { [ "sssd", "pam_ldap", ]:
|
package { "sssd":
|
||||||
ensure => installed,
|
ensure => installed,
|
||||||
}
|
}
|
||||||
exec { "authconfig --enableldap --enableldapauth --ldapserver='${ldap_uri}' --ldapbasedn='${ldap_basedn}' --enablesssd --krb5realm='' --update":
|
if $::operatingsystemrelease < 19 {
|
||||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
package { "pam_ldap":
|
||||||
unless => 'cat /etc/sysconfig/authconfig | egrep "^USELDAPAUTH=yes$|^USELDAP=yes$" | wc -l | egrep "^2$"',
|
ensure => installed,
|
||||||
before => Augeas["sssd-conf"],
|
before => Package["sssd"],
|
||||||
require => Package["authconfig", "sssd", "pam_ldap"],
|
}
|
||||||
|
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":
|
augeas { "sssd-conf":
|
||||||
changes => [
|
changes => [
|
||||||
|
@ -113,7 +131,7 @@ class ldap::auth inherits ldap::client {
|
||||||
],
|
],
|
||||||
incl => "/etc/sssd/sssd.conf",
|
incl => "/etc/sssd/sssd.conf",
|
||||||
lens => "MySQL.lns",
|
lens => "MySQL.lns",
|
||||||
before => Service["sssd"],
|
notify => Service["sssd"],
|
||||||
}
|
}
|
||||||
service { "sssd":
|
service { "sssd":
|
||||||
ensure => running,
|
ensure => running,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue