moved config into def, added tree_suffix paramter for lam
This commit is contained in:
parent
604d1b6a71
commit
2c98e83332
|
@ -27,9 +27,9 @@ Examples:
|
|||
configs => {
|
||||
wmde => {
|
||||
password => "1234",
|
||||
password_salt => "5678"
|
||||
password_salt => "5678",
|
||||
tree_suffix => "dc=wikimedia,dc=de",
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -101,26 +101,52 @@ class wmdeit_ldap::lam(
|
|||
, '\n', "\n "))
|
||||
|
||||
|
||||
|
||||
|
||||
file {"$docroot/config/$name.conf":
|
||||
ensure => file,
|
||||
content => template("wmdeit_ldap/wmde.conf.erb"),
|
||||
owner => "www-data",
|
||||
require => File["$docroot/config/pdf"],
|
||||
} ->
|
||||
file {"$docroot/config/profiles/$name":
|
||||
ensure=>directory
|
||||
}->
|
||||
file{"$docroot/config/profiles/$name/default.user":
|
||||
ensure=>file,
|
||||
content => template("wmdeit_ldap/default.user.erb")
|
||||
} ->
|
||||
file{"$docroot/config/profiles/$name/default.group":
|
||||
ensure=>file,
|
||||
content => template("wmdeit_ldap/default.group.erb")
|
||||
}
|
||||
wmdeit_ldap::lam::config {$name:
|
||||
encoded_password => $encoded_password,
|
||||
encoded_password_salt => $encoded_password_salt,
|
||||
suffix_user => $conf['suffix_user'],
|
||||
suffix_group => $conf['suffix_group'],
|
||||
tree_suffix => $conf['tree_suffix'],
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
define wmdeit_ldap::lam::config
|
||||
(
|
||||
$encoded_password,
|
||||
$encoded_password_salt,
|
||||
$tree_suffix,
|
||||
$suffix_user = "ou=People,$tree_suffix",
|
||||
$suffix_group = "ou=Groups,$tree_suffix",
|
||||
$docroot = $::wmdeit_ldap::lam::docroot
|
||||
){
|
||||
if (!$suffix_user) or (!$suffix_group) {
|
||||
fail("no suffix_user or suffix_group given")
|
||||
}
|
||||
|
||||
file {"$docroot/config/$title.conf":
|
||||
ensure => file,
|
||||
content => template("wmdeit_ldap/wmde.conf.erb"),
|
||||
owner => "www-data",
|
||||
require => File["$docroot/config/pdf"],
|
||||
} ->
|
||||
file {"$docroot/config/profiles/$title":
|
||||
ensure=>directory
|
||||
}->
|
||||
file{"$docroot/config/profiles/$title/default.user":
|
||||
ensure=>file,
|
||||
content => template("wmdeit_ldap/default.user.erb")
|
||||
} ->
|
||||
file{"$docroot/config/profiles/$title/default.group":
|
||||
ensure=>file,
|
||||
content => template("wmdeit_ldap/default.group.erb")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ Passwd: {SSHA}<%= @encoded_password %> <%= @encoded_password_salt %>
|
|||
|
||||
# suffix of tree view
|
||||
# e.g. dc=yourdomain,dc=org
|
||||
treesuffix: dc=wikimedia,dc=de
|
||||
treesuffix: <%= @tree_suffix %>
|
||||
|
||||
# default language (a line from config/language)
|
||||
defaultLanguage: en_GB.utf8
|
||||
|
@ -50,11 +50,11 @@ modules: posixAccount_pwdHash: SSHA
|
|||
activeTypes: user,group
|
||||
|
||||
|
||||
types: suffix_user: ou=People,dc=wikimedia,dc=de
|
||||
types: suffix_user: <%= @suffix_user %>
|
||||
types: attr_user: #uid;#givenName;#sn;#uidNumber;#gidNumber
|
||||
types: modules_user: inetOrgPerson,posixAccount,shadowAccount
|
||||
|
||||
types: suffix_group: ou=group,dc=wikimedia,dc=de
|
||||
types: suffix_group: <%= @suffix_group %>
|
||||
types: attr_group: #cn;#gidNumber;#memberUID;#description
|
||||
types: modules_group: wmdeGroup
|
||||
|
||||
|
|
Loading…
Reference in New Issue