39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
# File 'manifests/resource/ldap.pp', line 39
define icingaweb2::resource::ldap (
String[1] $resource_name = $title,
String[1] $host = 'localhost',
Optional[Stdlib::Port] $port = undef,
Optional[String[1]] $root_dn = undef,
Optional[String[1]] $bind_dn = undef,
Optional[Icinga::Secret] $bind_pw = undef,
Enum['none', 'starttls', 'ldaps'] $encryption = 'none',
Integer $timeout = 5,
) {
$conf_dir = $icingaweb2::globals::conf_dir
$settings = {
'type' => 'ldap',
'hostname' => $host,
'port' => $port,
'root_dn' => $root_dn,
'bind_dn' => $bind_dn,
'bind_pw' => unwrap($bind_pw),
'encryption' => $encryption,
'timeout' => $timeout,
}
icingaweb2::inisection { "resource-${resource_name}":
section_name => $resource_name,
target => "${conf_dir}/resources.ini",
settings => delete_undef_values($settings),
}
}
|