Added dependency on authconfig package to kerberos, ldap and pam modules

Fixes #2.
This commit is contained in:
Ossi Salmi 2013-01-24 12:16:22 +02:00
parent 18af82f97f
commit 5924caabe1
3 changed files with 16 additions and 6 deletions

View file

@ -74,6 +74,8 @@ class kerberos::client {
#
class kerberos::auth {
include pam::common
include kerberos::client
$kdclist = inline_template('<%= kerberos_kdc.join(" ") -%>')
@ -86,7 +88,7 @@ class kerberos::auth {
path => "/bin:/usr/bin:/sbin:/usr/sbin",
unless => "egrep '^USEKERBEROS=yes\$' /etc/sysconfig/authconfig",
before => Class["kerberos::client"],
require => Package["pam_krb5"],
require => Package["authconfig", "pam_krb5"],
}
}
default: {

View file

@ -14,6 +14,8 @@
#
class ldap::auth inherits ldap::client {
include pam::common
tag("bootstrap")
$ldap_uri = inline_template('<%= ldap_server.join(" ") -%>')
@ -31,7 +33,7 @@ class ldap::auth inherits ldap::client {
before => [ Augeas["nslcd-conf"],
Augeas["pam-ldap-conf"],
File["/etc/openldap/ldap.conf"], ],
require => Package["nss-pam-ldapd"],
require => Package["authconfig", "nss-pam-ldapd"],
}
augeas { "nslcd-conf":
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$"',
before => [ Augeas["pam-ldap-conf"],
File["/etc/openldap/ldap.conf"], ],
require => Package["nss_ldap"],
require => Package["authconfig", "nss_ldap"],
}
augeas { "pam-ldap-conf":
context => "/files/etc/ldap.conf",
@ -100,7 +102,7 @@ class ldap::auth inherits ldap::client {
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["sssd"], Package["pam_ldap"], ],
require => Package["authconfig", "sssd", "pam_ldap"],
}
augeas { "sssd-conf":
changes => [

View file

@ -4,6 +4,11 @@
class pam::common {
case $::operatingsystem {
"centos","redhat","fedora": {
package { "authconfig":
ensure => installed,
}
}
"ubuntu": {
package { "libpam-runtime":
ensure => installed,
@ -28,8 +33,9 @@ class pam::mkhomedir {
case $::operatingsystem {
"centos","redhat","fedora": {
exec { "authconfig --enablemkhomedir --update":
path => "/bin:/usr/bin:/sbin:/usr/sbin",
unless => "egrep '^USEMKHOMEDIR=yes\$' /etc/sysconfig/authconfig",
path => "/bin:/usr/bin:/sbin:/usr/sbin",
unless => "egrep '^USEMKHOMEDIR=yes\$' /etc/sysconfig/authconfig",
require => Package["authconfig"],
}
}
"ubuntu": {