diff options
author | varac <varacanero@zeromail.org> | 2014-03-04 16:40:27 +0100 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2014-03-04 18:18:37 +0100 |
commit | 8d77d623106d5e5edd52c086568d5caa1cb87413 (patch) | |
tree | 987cd888fa905f6679b7fea6c8fe85b11f8068a1 /manifests/config.pp | |
parent | 764cd8a0122483dce6e0a37e303b757ec0a6449e (diff) |
use check_mk::server::collect_hosts for collecting storedconfig nodes
Diffstat (limited to 'manifests/config.pp')
-rw-r--r-- | manifests/config.pp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/manifests/config.pp b/manifests/config.pp index f764397..6a6f375 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -1,9 +1,10 @@ class check_mk::config ( $site, - $host_groups = undef, - $etc_dir = "/omd/sites/${site}/etc", - $nagios_subdir = 'nagios', - $bin_dir = "/omd/sites/${site}/bin" + $host_groups = undef, + $etc_dir = "/omd/sites/${site}/etc", + $nagios_subdir = 'nagios', + $bin_dir = "/omd/sites/${site}/bin", + $use_storedconfigs = true ) { file { "${etc_dir}/${nagios_subdir}/local": ensure => directory, @@ -38,10 +39,11 @@ class check_mk::config ( content => "]\n", order => 19, } - Check_mk::Host <<| |>> { - target => "${etc_dir}/check_mk/main.mk", - notify => Exec['check_mk-refresh'] + if ( $use_storedconfigs ) { + class { 'check_mk::server::collect_hosts': } } + + # local list of hosts is in /omd/sites/${site}/etc/check_mk/all_hosts_static and is appended concat::fragment { 'all-hosts-static': ensure => "${etc_dir}/check_mk/all_hosts_static", |