Compare commits
2 Commits
f9a8baa956
...
41992f1513
Author | SHA1 | Date |
---|---|---|
Tobias Herre | 41992f1513 | |
Tobias Herre | 2be2f8ead5 |
22
README.md
22
README.md
|
@ -10,3 +10,25 @@ For LAM
|
||||||
puppet module install puppetlabs-apache
|
puppet module install puppetlabs-apache
|
||||||
puppet module install puppet-php
|
puppet module install puppet-php
|
||||||
|
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
class {"wmdeit_ldap":
|
||||||
|
serverid => 17,
|
||||||
|
simple_bind_tls => "0",
|
||||||
|
log_level => 4,
|
||||||
|
}
|
||||||
|
|
||||||
|
class {"wmdeit_ldap::lam":
|
||||||
|
master_password => "1234",
|
||||||
|
master_password_salt => "5678",
|
||||||
|
|
||||||
|
configs => {
|
||||||
|
wmde => {
|
||||||
|
password => "123456",
|
||||||
|
password_salt => "Tube1234"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ class wmdeit_ldap::lam(
|
||||||
$master_password_salt = "ABCD1234",
|
$master_password_salt = "ABCD1234",
|
||||||
|
|
||||||
$configs = {
|
$configs = {
|
||||||
"wmde" => ""
|
"wmde" => {}
|
||||||
}
|
}
|
||||||
|
|
||||||
) {
|
) {
|
||||||
|
@ -83,6 +83,26 @@ class wmdeit_ldap::lam(
|
||||||
}
|
}
|
||||||
|
|
||||||
$configs.each | String $name, $conf | {
|
$configs.each | String $name, $conf | {
|
||||||
|
$password = $conf['password'] ? {
|
||||||
|
undef => '1234',
|
||||||
|
default => $conf['password'],
|
||||||
|
}
|
||||||
|
$password_salt = $conf['password_salt'] ? {
|
||||||
|
undef => '5678',
|
||||||
|
default => $conf['password_salt'],
|
||||||
|
}
|
||||||
|
|
||||||
|
$encoded_password= strip (regsubst(
|
||||||
|
generate ("/bin/sh", "-c", "echo -n $password$password_salt | openssl dgst -binary -sha1 | openssl base64")
|
||||||
|
, '\n', "\n "))
|
||||||
|
|
||||||
|
$encoded_password_salt = strip(regsubst(
|
||||||
|
generate("/bin/sh","-c", "echo -n $password_salt | openssl base64")
|
||||||
|
, '\n', "\n "))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
file {"$docroot/config/$name.conf":
|
file {"$docroot/config/$name.conf":
|
||||||
ensure => file,
|
ensure => file,
|
||||||
content => template("wmdeit_ldap/wmde.conf.erb"),
|
content => template("wmdeit_ldap/wmde.conf.erb"),
|
||||||
|
|
|
@ -13,7 +13,8 @@ ServerURL: ldap://localhost:389
|
||||||
Admins: cn=admin,dc=wikimedia,dc=de
|
Admins: cn=admin,dc=wikimedia,dc=de
|
||||||
|
|
||||||
# password to change these preferences via webfrontend (default: lam)
|
# password to change these preferences via webfrontend (default: lam)
|
||||||
Passwd: {SSHA}T7uRmkbOgzr9k0BVJi1GvqqwJJQ= iaZAeQ==
|
#Passwd: {SSHA}T7uRmkbOgzr9k0BVJi1GvqqwJJQ= iaZAeQ==
|
||||||
|
Passwd: {SSHA}<%= @encoded_password %> <%= @encoded_password_salt %>
|
||||||
|
|
||||||
# suffix of tree view
|
# suffix of tree view
|
||||||
# e.g. dc=yourdomain,dc=org
|
# e.g. dc=yourdomain,dc=org
|
||||||
|
|
Loading…
Reference in New Issue