Added dependency on authconfig package to kerberos, ldap and pam modules
Fixes #2.
This commit is contained in:
parent
18af82f97f
commit
5924caabe1
3 changed files with 16 additions and 6 deletions
|
@ -74,6 +74,8 @@ class kerberos::client {
|
||||||
#
|
#
|
||||||
class kerberos::auth {
|
class kerberos::auth {
|
||||||
|
|
||||||
|
include pam::common
|
||||||
|
|
||||||
include kerberos::client
|
include kerberos::client
|
||||||
$kdclist = inline_template('<%= kerberos_kdc.join(" ") -%>')
|
$kdclist = inline_template('<%= kerberos_kdc.join(" ") -%>')
|
||||||
|
|
||||||
|
@ -86,7 +88,7 @@ class kerberos::auth {
|
||||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||||
unless => "egrep '^USEKERBEROS=yes\$' /etc/sysconfig/authconfig",
|
unless => "egrep '^USEKERBEROS=yes\$' /etc/sysconfig/authconfig",
|
||||||
before => Class["kerberos::client"],
|
before => Class["kerberos::client"],
|
||||||
require => Package["pam_krb5"],
|
require => Package["authconfig", "pam_krb5"],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
#
|
#
|
||||||
class ldap::auth inherits ldap::client {
|
class ldap::auth inherits ldap::client {
|
||||||
|
|
||||||
|
include pam::common
|
||||||
|
|
||||||
tag("bootstrap")
|
tag("bootstrap")
|
||||||
|
|
||||||
$ldap_uri = inline_template('<%= ldap_server.join(" ") -%>')
|
$ldap_uri = inline_template('<%= ldap_server.join(" ") -%>')
|
||||||
|
@ -31,7 +33,7 @@ class ldap::auth inherits ldap::client {
|
||||||
before => [ Augeas["nslcd-conf"],
|
before => [ Augeas["nslcd-conf"],
|
||||||
Augeas["pam-ldap-conf"],
|
Augeas["pam-ldap-conf"],
|
||||||
File["/etc/openldap/ldap.conf"], ],
|
File["/etc/openldap/ldap.conf"], ],
|
||||||
require => Package["nss-pam-ldapd"],
|
require => Package["authconfig", "nss-pam-ldapd"],
|
||||||
}
|
}
|
||||||
augeas { "nslcd-conf":
|
augeas { "nslcd-conf":
|
||||||
changes => [ "set pagesize 500",
|
changes => [ "set pagesize 500",
|
||||||
|
@ -69,7 +71,7 @@ class ldap::auth inherits ldap::client {
|
||||||
unless => 'cat /etc/sysconfig/authconfig | egrep "^USELDAPAUTH=yes$|^USELDAP=yes$" | wc -l | egrep "^2$"',
|
unless => 'cat /etc/sysconfig/authconfig | egrep "^USELDAPAUTH=yes$|^USELDAP=yes$" | wc -l | egrep "^2$"',
|
||||||
before => [ Augeas["pam-ldap-conf"],
|
before => [ Augeas["pam-ldap-conf"],
|
||||||
File["/etc/openldap/ldap.conf"], ],
|
File["/etc/openldap/ldap.conf"], ],
|
||||||
require => Package["nss_ldap"],
|
require => Package["authconfig", "nss_ldap"],
|
||||||
}
|
}
|
||||||
augeas { "pam-ldap-conf":
|
augeas { "pam-ldap-conf":
|
||||||
context => "/files/etc/ldap.conf",
|
context => "/files/etc/ldap.conf",
|
||||||
|
@ -100,7 +102,7 @@ class ldap::auth inherits ldap::client {
|
||||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||||
unless => 'cat /etc/sysconfig/authconfig | egrep "^USELDAPAUTH=yes$|^USELDAP=yes$" | wc -l | egrep "^2$"',
|
unless => 'cat /etc/sysconfig/authconfig | egrep "^USELDAPAUTH=yes$|^USELDAP=yes$" | wc -l | egrep "^2$"',
|
||||||
before => Augeas["sssd-conf"],
|
before => Augeas["sssd-conf"],
|
||||||
require => [ Package["sssd"], Package["pam_ldap"], ],
|
require => Package["authconfig", "sssd", "pam_ldap"],
|
||||||
}
|
}
|
||||||
augeas { "sssd-conf":
|
augeas { "sssd-conf":
|
||||||
changes => [
|
changes => [
|
||||||
|
|
|
@ -4,6 +4,11 @@
|
||||||
class pam::common {
|
class pam::common {
|
||||||
|
|
||||||
case $::operatingsystem {
|
case $::operatingsystem {
|
||||||
|
"centos","redhat","fedora": {
|
||||||
|
package { "authconfig":
|
||||||
|
ensure => installed,
|
||||||
|
}
|
||||||
|
}
|
||||||
"ubuntu": {
|
"ubuntu": {
|
||||||
package { "libpam-runtime":
|
package { "libpam-runtime":
|
||||||
ensure => installed,
|
ensure => installed,
|
||||||
|
@ -30,6 +35,7 @@ class pam::mkhomedir {
|
||||||
exec { "authconfig --enablemkhomedir --update":
|
exec { "authconfig --enablemkhomedir --update":
|
||||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||||
unless => "egrep '^USEMKHOMEDIR=yes\$' /etc/sysconfig/authconfig",
|
unless => "egrep '^USEMKHOMEDIR=yes\$' /etc/sysconfig/authconfig",
|
||||||
|
require => Package["authconfig"],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
"ubuntu": {
|
"ubuntu": {
|
||||||
|
|
Loading…
Add table
Reference in a new issue