Fixing puppet-lint errors.
This commit is contained in:
parent
2f83cb7d4a
commit
34c36045fa
59 changed files with 995 additions and 990 deletions
|
@ -90,7 +90,7 @@ class ldap::auth inherits ldap::client {
|
|||
require => Package["nscd"],
|
||||
}
|
||||
}
|
||||
Ubuntu: {
|
||||
Ubuntu: {
|
||||
package { "ldap-auth-client":
|
||||
ensure => installed,
|
||||
}
|
||||
|
@ -111,23 +111,23 @@ class ldap::auth inherits ldap::client {
|
|||
"set base ${ldap_basedn}",
|
||||
"set nss_paged_results yes",
|
||||
"set pam_password exop",
|
||||
"rm rootbinddn",
|
||||
"rm rootbinddn",
|
||||
"set ssl on", ],
|
||||
onlyif => [ "get uri != '${ldap_uri}'",
|
||||
"get base != ${ldap_basedn}",
|
||||
"get nss_paged_results != yes",
|
||||
"get pam_password != exop",
|
||||
"get rootbinddn == 'cn=manager,dc=example,dc=net'",
|
||||
"get rootbinddn == 'cn=manager,dc=example,dc=net'",
|
||||
"get ssl != on", ],
|
||||
}
|
||||
}
|
||||
Debian: {
|
||||
Debian: {
|
||||
package {[ "libnss-ldap",
|
||||
"libpam-ldap" ]:
|
||||
"libpam-ldap" ]:
|
||||
ensure => installed,
|
||||
}
|
||||
## Debian lacks some lenses. nss-ldap-conf and pam_ldap-conf needs corresponding files
|
||||
## to /usr/share/augeas/lenses/dist/spacevars.aug. More info at:
|
||||
## to /usr/share/augeas/lenses/dist/spacevars.aug. More info at:
|
||||
## https://github.com/jwm/augeas/commit/8f768f45779048cbd95b5b7d71682b808d41bfd3
|
||||
## There isn't lens for nsswitch.conf either. nss-ldap-conf and pam_ldap-conf are tested, nsswitch isn't.
|
||||
# augeas { "nss-ldap-conf":
|
||||
|
@ -144,7 +144,7 @@ class ldap::auth inherits ldap::client {
|
|||
# "get pam_password != exop",
|
||||
# "get rootbinddn == 'cn=manager,dc=example,dc=net'",
|
||||
# "get ssl != on", ],
|
||||
# require => Package["libnss-ldap"],
|
||||
# require => Package["libnss-ldap"],
|
||||
# }
|
||||
# augeas { "pam_ldap-conf":
|
||||
# context => "/files/etc/pam_ldap.conf",
|
||||
|
@ -160,7 +160,7 @@ class ldap::auth inherits ldap::client {
|
|||
# "get pam_password != exop",
|
||||
# "get rootbinddn == 'cn=manager,dc=example,dc=net'",
|
||||
# "get ssl != on", ],
|
||||
# require => Package["libpam-ldap"],
|
||||
# require => Package["libpam-ldap"],
|
||||
# }
|
||||
# augeas { "nsswitch-conf":
|
||||
# context => "/files/etc/nsswitch.conf",
|
||||
|
@ -170,7 +170,7 @@ class ldap::auth inherits ldap::client {
|
|||
# onlyif => [ "get passwd: != 'files ldap'",
|
||||
# "get group: != 'files ldap'",
|
||||
# "get shadow: != 'files ldap'", ],
|
||||
# require => [ Augeas["pam_ldap-conf"],
|
||||
# require => [ Augeas["pam_ldap-conf"],
|
||||
# Augeas["nss-ldap-conf"], ],
|
||||
# }
|
||||
}
|
||||
|
@ -215,7 +215,7 @@ class ldap::client {
|
|||
"debian" => "ldap-utils",
|
||||
"ubuntu" => "ldap-utils",
|
||||
"openbsd" => "openldap-client",
|
||||
default => "openldap-clients",
|
||||
default => "openldap-clients",
|
||||
},
|
||||
ensure => $operatingsystem ? {
|
||||
darwin => absent,
|
||||
|
@ -227,16 +227,16 @@ class ldap::client {
|
|||
ensure => present,
|
||||
content => template("ldap/ldap.conf.erb"),
|
||||
path => $operatingsystem ? {
|
||||
"debian" => "/etc/ldap/ldap.conf",
|
||||
"ubuntu" => "/etc/ldap/ldap.conf",
|
||||
default => "/etc/openldap/ldap.conf",
|
||||
"debian" => "/etc/ldap/ldap.conf",
|
||||
"ubuntu" => "/etc/ldap/ldap.conf",
|
||||
default => "/etc/openldap/ldap.conf",
|
||||
},
|
||||
mode => 0644,
|
||||
owner => root,
|
||||
group => $operatingsystem ? {
|
||||
"darwin" => wheel,
|
||||
"openbsd" => wheel,
|
||||
default => root,
|
||||
default => root,
|
||||
},
|
||||
require => Package["openldap-client"],
|
||||
}
|
||||
|
@ -273,8 +273,8 @@ class ldap::client::ruby {
|
|||
}
|
||||
|
||||
package { "ruby-ldap":
|
||||
name => $pkgname,
|
||||
ensure => installed,
|
||||
name => $pkgname,
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -346,8 +346,8 @@ class ldap::server {
|
|||
}
|
||||
|
||||
package { "openldap-server":
|
||||
name => $package_name,
|
||||
ensure => installed,
|
||||
name => $package_name,
|
||||
}
|
||||
|
||||
file { "${ssl::certs}/slapd.crt":
|
||||
|
@ -373,8 +373,8 @@ class ldap::server {
|
|||
}
|
||||
|
||||
file { "slapd.conf":
|
||||
path => "${config}/slapd.conf",
|
||||
ensure => present,
|
||||
path => "${config}/slapd.conf",
|
||||
content => template("ldap/slapd.conf.erb"),
|
||||
mode => 0640,
|
||||
owner => "root",
|
||||
|
@ -418,7 +418,7 @@ class ldap::server {
|
|||
}
|
||||
|
||||
if $ldap_datadir {
|
||||
file { "${ldap_datadir}":
|
||||
file { $ldap_datadir:
|
||||
ensure => directory,
|
||||
mode => 0700,
|
||||
owner => $user,
|
||||
|
@ -427,10 +427,10 @@ class ldap::server {
|
|||
}
|
||||
file { "/srv/ldap":
|
||||
ensure => link,
|
||||
target => "${ldap_datadir}",
|
||||
require => File["${ldap_datadir}"],
|
||||
}
|
||||
} else {
|
||||
target => $ldap_datadir,
|
||||
require => File[$ldap_datadir],
|
||||
}
|
||||
} else {
|
||||
file { "/srv/ldap":
|
||||
ensure => directory,
|
||||
mode => 0700,
|
||||
|
@ -587,8 +587,8 @@ define ldap::server::schema($idx = 50) {
|
|||
include ldap::server
|
||||
|
||||
file { "${name}.schema":
|
||||
path => "${ldap::server::config}/schema/${idx}-${name}.schema",
|
||||
ensure => present,
|
||||
path => "${ldap::server::config}/schema/${idx}-${name}.schema",
|
||||
source => [ "puppet:///files/ldap/${name}.schema",
|
||||
"puppet:///modules/ldap/${name}.schema", ],
|
||||
mode => 0644,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue