ldap: Fixed ldap::auth when running from Fedora 19 kickstart.
This commit is contained in:
parent
98b89b0fe0
commit
917ea4c93d
1 changed files with 12 additions and 12 deletions
|
@ -98,18 +98,7 @@ class ldap::auth inherits ldap::client {
|
||||||
package { "sssd":
|
package { "sssd":
|
||||||
ensure => installed,
|
ensure => installed,
|
||||||
}
|
}
|
||||||
if $::operatingsystemrelease < 19 {
|
if versioncmp($::operatingsystemrelease, "18") == 1 {
|
||||||
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":
|
exec { "authconfig --enableldap --enableldapauth --ldapserver='${ldap_uri}' --ldapbasedn='${ldap_basedn}' --krb5realm='' --update":
|
||||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||||
creates => "/etc/sssd/sssd.conf",
|
creates => "/etc/sssd/sssd.conf",
|
||||||
|
@ -121,6 +110,17 @@ class ldap::auth inherits ldap::client {
|
||||||
refreshonly => true,
|
refreshonly => true,
|
||||||
before => Augeas["sssd-conf"],
|
before => Augeas["sssd-conf"],
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
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"], ],
|
||||||
|
}
|
||||||
}
|
}
|
||||||
augeas { "sssd-conf":
|
augeas { "sssd-conf":
|
||||||
changes => [
|
changes => [
|
||||||
|
|
Loading…
Add table
Reference in a new issue