2015-04-23 11:40:42 +02:00
|
|
|
# Define for setting IcingaWeb2 File Resource
|
|
|
|
#
|
2015-03-16 18:44:56 +01:00
|
|
|
define icingaweb2::config::resource_file (
|
|
|
|
$resource_filepath = undef,
|
2015-04-23 11:40:42 +02:00
|
|
|
$resource_name = $title,
|
2015-03-16 18:44:56 +01:00
|
|
|
$resource_pattern = 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 => 'file',
|
|
|
|
}
|
|
|
|
|
|
|
|
ini_setting { "icingaweb2 resources ${title} filepath":
|
|
|
|
section => $resource_name,
|
|
|
|
setting => 'filename',
|
|
|
|
value => "\"${resource_filepath}\"",
|
|
|
|
}
|
|
|
|
|
|
|
|
ini_setting { "icingaweb2 resources ${title} fields":
|
|
|
|
section => $resource_name,
|
|
|
|
setting => 'fields',
|
|
|
|
value => "\"${resource_pattern}\"",
|
|
|
|
}
|
|
|
|
}
|
2015-04-23 11:40:42 +02:00
|
|
|
|