From 3eafa1d58dccfddd043a411ebb7f71836329e737 Mon Sep 17 00:00:00 2001 From: Lennart Betz Date: Fri, 14 Sep 2018 10:55:15 +0200 Subject: [PATCH] fix #464 Rework param data types of icinga2::feature::statusdata --- README.md | 6 +++--- manifests/feature/statusdata.pp | 17 +++++++++-------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 51baa2224..a44bb7b97 100644 --- a/README.md +++ b/README.md @@ -1103,18 +1103,18 @@ Enables or disables the `statusdata` feature. Either `present` or `absent`. Defines if the feature `statusdata` should be enabled. Defaults to `present`. ##### `status_path` -Absolute path to the status.dat file. Default depends on platform: +Absolute path to the status.dat file. Defaults depend on platform: * Linux: `/var/cache/icinga2/status.dat` * Windows: `C:/ProgramData/icinga2/var/cache/icinga2/status.dat` ##### `object_path` -Absolute path to the object.cache file. Default depends on platform: +Absolute path to the object.cache file. Defaults depend on platform: * Linux: `/var/cache/icinga2/object.cache` * Windows: `C:/ProgramData/icinga2/var/cache/icinga2/object.cache` ##### `update_interval` Interval in seconds to update both status files. You can also specify it in minutes with the letter m or in seconds -with s. Defaults to `30s` +with s. Icinga defaults to `15s` #### Class: `icinga2::feature::syslog` Enables or disables the `syslog` feature. diff --git a/manifests/feature/statusdata.pp b/manifests/feature/statusdata.pp index 8573c74fd..eab11d530 100644 --- a/manifests/feature/statusdata.pp +++ b/manifests/feature/statusdata.pp @@ -8,25 +8,26 @@ # Set to present enables the feature statusdata, absent disables it. Defaults to present. # # [*status_path*] -# Absolute path to the status.dat file. Default depends on platform: +# Absolute path to the status.dat file. Defaults depend on platform: # /var/cache/icinga2/status.dat on Linux # C:/ProgramData/icinga2/var/cache/icinga2/status.dat on Windows # # [*object_path*] -# Absolute path to the object.cache file. Default depends on platform: +# Absolute path to the object.cache file. Defaults depend on platform: # /var/cache/icinga2/object.cache on Linux # C:/ProgramData/icinga2/var/cache/icinga2/object.cache on Windows # # [*update_interval*] -# Interval in seconds to update both status files. -# You can also specify it in minutes with the letter m or in seconds with s. Defaults to '15s' +# Interval in seconds to update both status files. You can also specify +# it in minutes with the letter m or in seconds with s. +# Icinga defaults to '15s' # # class icinga2::feature::statusdata( - Enum['absent', 'present'] $ensure = present, - Stdlib::Absolutepath $status_path = "${::icinga2::params::cache_dir}/status.dat", - Stdlib::Absolutepath $objects_path = "${::icinga2::params::cache_dir}/objects.cache", - Pattern[/^\d+[ms]*$/] $update_interval = '15s', + Enum['absent', 'present'] $ensure = present, + Optional[Stdlib::Absolutepath] $status_path = undef, + Optiona[Stdlib::Absolutepath] $objects_path = undef, + Optiona[Pattern[/^\d+[ms]*$/]] $update_interval = undef, ) { if ! defined(Class['::icinga2']) {