creates default user and group config, added configs paramater

This commit is contained in:
Tobias Herre 2020-08-20 07:39:01 +02:00
parent 6cf07d8643
commit 0157d4c36b
1 changed files with 29 additions and 4 deletions

View File

@ -10,6 +10,10 @@ class wmdeit_ldap::lam(
$master_password = "lam", $master_password = "lam",
$master_password_salt = "ABCD1234", $master_password_salt = "ABCD1234",
$configs = {
"wmde" => ""
}
) { ) {
$arcfile = "/tmp/$archive" $arcfile = "/tmp/$archive"
$extractdir = "/var/www/ldapaccountmanager" $extractdir = "/var/www/ldapaccountmanager"
@ -67,10 +71,31 @@ class wmdeit_ldap::lam(
content => template("wmdeit_ldap/lam-config.cfg.erb"), content => template("wmdeit_ldap/lam-config.cfg.erb"),
owner => "www-data", owner => "www-data",
} -> } ->
file {"$docroot/config/wmde.conf": file {"$docroot/config/profiles":
ensure => directory,
} ->
file {"$docroot/config/pdf":
ensure => directory,
}
$configs.each | String $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"),
owner => "www-data", 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")
}
} }
} }