module-icingaweb2/manifests/config/resource_ldap.pp

54 lines
1.3 KiB
ObjectPascal
Raw Normal View History

2015-04-23 11:40:42 +02:00
# Define for setting IcingaWeb2 LDAP Resource
#
define icingaweb2::config::resource_ldap (
2015-04-23 11:40:42 +02:00
$resource_bind_dn = undef,
$resource_bind_pw = undef,
$resource_host = undef,
2015-04-23 11:40:42 +02:00
$resource_name = $title,
$resource_port = undef,
$resource_root_dn = undef,
) {
Ini_Setting {
ensure => present,
require => File["${::icingaweb2::config_dir}/resources.ini"],
path => "${::icingaweb2::config_dir}/resources.ini",
}
ini_setting { "icingaweb2 resources ${title} type":
section => $resource_name,
setting => 'type',
value => 'ldap',
}
ini_setting { "icingaweb2 resources ${title} hostname":
section => $resource_name,
setting => 'hostname',
value => "\"${resource_host}\"",
}
ini_setting { "icingaweb2 resources ${title} port":
section => $resource_name,
setting => 'port',
value => "\"${resource_port}\"",
}
ini_setting { "icingaweb2 resources ${title} root_dn":
section => $resource_name,
setting => 'root_dn',
value => "\"${resource_root_dn}\"",
}
ini_setting { "icingaweb2 resources ${title} bind_dn":
section => $resource_name,
setting => 'bind_dn',
value => "\"${resource_bind_dn}\"",
}
ini_setting { "icingaweb2 resources ${title} bind_pw":
section => $resource_name,
setting => 'bind_pw',
value => "\"${resource_bind_pw}\"",
}
}
2015-04-23 11:40:42 +02:00