Commit e8421bb7 authored by Markus Frosch's avatar Markus Frosch
Browse files

icingaweb2: Provide backend_group defined type

parent 6b2fe952
define icinga2_testing::profiles::icingaweb2::backend_group (
$resource,
$user_backend = 'icingaweb2',
$group_class = 'group',
$group_name_attribute = 'cn',
$group_member_attribute = 'member',
$group_filter = undef,
$base_dn = undef,
){
include ::icingaweb2
ensure_resource('file', "${::icingaweb2::config_dir}/groups.ini", {
ensure => file,
owner => $::icingaweb2::config_owner,
group => $::icingaweb2::config_group,
}
)
Ini_Setting {
ensure => present,
section => $name,
require => File["${::icingaweb2::config_dir}/groups.ini"],
path => "${::icingaweb2::config_dir}/groups.ini",
}
ini_setting {
"icingaweb2 group ${name} resource":
ensure => $resource ? { undef => absent, default => present },
setting => 'resource',
value => $resource;
"icingaweb2 group ${name} user_backend":
ensure => $user_backend ? { undef => absent, default => present },
setting => 'user_backend',
value => $user_backend;
"icingaweb2 group ${name} group_class":
ensure => $group_class ? { undef => absent, default => present },
setting => 'group_class',
value => $group_class;
"icingaweb2 group ${name} group_name_attribute":
ensure => $group_name_attribute ? { undef => absent, default => present },
setting => 'group_name_attribute',
value => $group_name_attribute;
"icingaweb2 group ${name} group_member_attribute":
ensure => $group_member_attribute ? { undef => absent, default => present },
setting => 'group_member_attribute',
value => $group_member_attribute;
"icingaweb2 group ${name} group_filter":
ensure => $group_filter ? { undef => absent, default => present },
setting => 'group_filter',
value => $group_filter;
"icingaweb2 group ${name} base_dn":
ensure => $base_dn ? { undef => absent, default => present },
setting => 'base_dn',
value => $base_dn;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment