Add ldap auth define type.

This commit is contained in:
Eric Zounes 2015-06-08 14:39:43 -07:00 committed by Tom De Vylder
parent 944e648ce5
commit 144be24450

View file

@ -0,0 +1,50 @@
define icingaweb2::config::authentication_ldap (
$auth_section = undef,
$auth_resource = undef,
$backend = 'ldap',
$user_class = 'inetOrgPerson',
$filter = '',
$user_name_attribute = 'uid',
$base_dn = undef,
){
Ini_Setting {
ensure => present,
section => $auth_section,
require => File["${::icingaweb2::config_dir}/authentication.ini"],
path => "${::icingaweb2::config_dir}/authentication.ini",
}
ini_setting { "icingaweb2 authentication ${title} resource":
setting => 'resource',
value => "\"${auth_resource}\"",
}
ini_setting { "icingaweb2 authentication ${title} backend":
setting => 'backend',
value => "\"${backend}\"",
}
ini_setting { "icingaweb2 authentication ${title} user_class":
setting => 'user_class',
value => "\"${user_class}\"",
}
ini_setting { "icingaweb2 authentication ${title} filter":
setting => 'filter',
value => "\"${filter}\"",
}
ini_setting { "icingaweb2 authentication ${title} user_name_attribute":
setting => 'user_name_attribute',
value => "\"${user_name_attribute}\"",
}
ini_setting { "icingaweb2 authentication ${title} base_dn":
setting => 'base_dn',
value => "\"${base_dn}\"",
}
}